Browse Source
Add dispatch conditions, changed docker tags and updated used actions
pull/985/head
Leon Stoldt
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
6 deletions
-
.github/workflows/docker-image.yml
|
|
@ -1,9 +1,11 @@ |
|
|
|
name: Docker Image CI |
|
|
|
|
|
|
|
on: |
|
|
|
workflow_dispatch: |
|
|
|
release: |
|
|
|
push: |
|
|
|
tags: |
|
|
|
- 'v*.*.*' |
|
|
|
- '*.*.*' |
|
|
|
|
|
|
|
jobs: |
|
|
|
|
|
|
@ -12,26 +14,26 @@ jobs: |
|
|
|
runs-on: ubuntu-latest |
|
|
|
steps: |
|
|
|
- name: Checkout code |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v3 |
|
|
|
|
|
|
|
- name: Login to DockerHub |
|
|
|
uses: docker/login-action@v1 |
|
|
|
uses: docker/login-action@v2 |
|
|
|
with: |
|
|
|
username: ${{ secrets.DOCKER_USERNAME }} |
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }} |
|
|
|
|
|
|
|
- name: Extract metadata (tags, labels) for Docker |
|
|
|
id: meta |
|
|
|
uses: docker/metadata-action@v3 |
|
|
|
uses: docker/metadata-action@v4 |
|
|
|
with: |
|
|
|
images: leonstoldt/ghostfolio |
|
|
|
tags: | |
|
|
|
type=semver,pattern={{version}} |
|
|
|
type=ref,event=tag |
|
|
|
flavor: | |
|
|
|
latest=true |
|
|
|
|
|
|
|
- name: Build and push |
|
|
|
uses: docker/build-push-action@v2 |
|
|
|
uses: docker/build-push-action@v3 |
|
|
|
with: |
|
|
|
context: . |
|
|
|
file: ./Dockerfile |
|
|
|