File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : build-tagged-container
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+ env :
8+ REGISTRY : ghcr.io
9+
10+ jobs :
11+ build-tagged-container :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Get tag
15+ id : tag
16+ uses : dawidd6/action-get-tag@v1
17+ with :
18+ # Optionally strip `v` prefix
19+ strip_v : true
20+ - name : Checkout Code
21+ uses : actions/checkout@v4
22+ - name : Login to GitHub Container Registry
23+ uses : docker/login-action@v1
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.repository_owner }}
27+ password : ${{ secrets.REGISTRY_TOKEN }}
28+ - name : Build and Push Docker Image
29+ uses : docker/build-push-action@v5
30+ with :
31+ file : ./Dockerfile.prod
32+ push : true # Will only build if this is not here
33+ tags : ${{ env.REGISTRY }}/${{ github.repository }}:${{steps.tag.outputs.tag}}
34+ secrets : |
35+ "BRANCH_NAME=${{ github.head_ref || github.ref_name }}"
You can’t perform that action at this time.
0 commit comments