diff options
author | André Oliveira <37463445+SpecialAro@users.noreply.github.com> | 2022-05-13 18:11:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 18:11:37 +0100 |
commit | 76e1b9122f122f681f93bcd112129dba6c73c6e5 (patch) | |
tree | d8207dd6e4c271b34abaa7ece587e10128e40a6c | |
parent | Add /app/recipes as a safe directory to git config (diff) | |
download | ferdium-server-76e1b9122f122f681f93bcd112129dba6c73c6e5.tar.gz ferdium-server-76e1b9122f122f681f93bcd112129dba6c73c6e5.tar.zst ferdium-server-76e1b9122f122f681f93bcd112129dba6c73c6e5.zip |
Update build and publish action (#34)
-rw-r--r-- | .github/workflows/docker.yml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3448d34..ea0f386 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml | |||
@@ -4,6 +4,8 @@ on: | |||
4 | push: | 4 | push: |
5 | branches: | 5 | branches: |
6 | - 'main' | 6 | - 'main' |
7 | tags: | ||
8 | - 'v*' | ||
7 | 9 | ||
8 | jobs: | 10 | jobs: |
9 | docker: | 11 | docker: |
@@ -19,10 +21,11 @@ jobs: | |||
19 | with: | 21 | with: |
20 | # list of Docker images to use as base name for tags | 22 | # list of Docker images to use as base name for tags |
21 | images: | | 23 | images: | |
24 | ${{ github.repository }} | ||
22 | ghcr.io/${{ github.repository }} | 25 | ghcr.io/${{ github.repository }} |
23 | # generate Docker tags based on the following events/attributes | 26 | # generate Docker tags based on the following events/attributes |
24 | tags: | | 27 | tags: | |
25 | type=ref,event=branch | 28 | latest |
26 | type=semver,pattern={{version}} | 29 | type=semver,pattern={{version}} |
27 | - | 30 | - |
28 | name: Set up QEMU | 31 | name: Set up QEMU |
@@ -38,6 +41,12 @@ jobs: | |||
38 | username: ${{ github.repository_owner }} | 41 | username: ${{ github.repository_owner }} |
39 | password: ${{ secrets.GITHUB_TOKEN }} | 42 | password: ${{ secrets.GITHUB_TOKEN }} |
40 | - | 43 | - |
44 | name: Login to DockerHub | ||
45 | uses: docker/login-action@v2 | ||
46 | with: | ||
47 | username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
48 | password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
49 | - | ||
41 | name: Build and push | 50 | name: Build and push |
42 | uses: docker/build-push-action@v3 | 51 | uses: docker/build-push-action@v3 |
43 | with: | 52 | with: |
@@ -49,3 +58,4 @@ jobs: | |||
49 | #push: ${{ github.event_name != 'pull_request' }} | 58 | #push: ${{ github.event_name != 'pull_request' }} |
50 | tags: ${{ steps.meta.outputs.tags }} | 59 | tags: ${{ steps.meta.outputs.tags }} |
51 | labels: ${{ steps.meta.outputs.labels }} | 60 | labels: ${{ steps.meta.outputs.labels }} |
61 | push: true | ||