@@ -3,7 +3,10 @@ name: Release
33on :
44 release :
55 types : [published]
6-
6+ env :
7+ REGISTRY : ghcr.io
8+ IMAGE_NAME : ${{ github.repository }}
9+
710jobs :
811
912 build :
@@ -28,13 +31,11 @@ jobs:
2831 - name : Get tag name
2932 run : echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
3033
31- - name : Get artifact details
32- uses : octokit/request-action@v2.x
33- id : get_release_details
34+ - name : Extract metadata (tags, labels) for Docker
35+ id : meta
36+ uses : docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3437 with :
35- route : get /repos/${{ github.repository }}/releases/tags/${{ env.TAG }}
36- env :
37- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3839
3940 - name : Upload AMD64 release asset
4041 uses : softprops/action-gh-release@v1
4950 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5051 with :
5152 files : traefik-forward-auth_arm
53+ - name : Log in to the Container registry
54+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
55+ with :
56+ registry : ${{ env.REGISTRY }}
57+ username : ${{ github.actor }}
58+ password : ${{ secrets.GITHUB_TOKEN }}
59+
60+ - name : Build and push Docker image
61+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
62+ with :
63+ context : .
64+ push : true
65+ tags : ${{ steps.meta.outputs.tags }}
66+ labels : ${{ steps.meta.outputs.labels }}
0 commit comments