File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1717 branch :
1818 type : string
1919 default : ' main'
20+ pr-head-sha :
21+ required : false
22+ type : string
23+ pr-head-ref :
24+ required : false
25+ type : string
2026
2127env :
2228 REGISTRY : ghcr.io/clubcedille
2531 build-and-push :
2632 runs-on : ubuntu-latest
2733 steps :
28- - name : Check Out Repo
29- uses : actions/checkout@v4
34+ - name : Check out source
35+ uses : actions/checkout@v5
36+ with :
37+ ref : ${{ inputs.pr-head-ref || inputs.pr-head-sha || '' }}
38+ fetch-depth : 0
3039
3140 - name : Set up Docker Buildx
3241 uses : docker/setup-buildx-action@v3
@@ -43,14 +52,16 @@ jobs:
4352 uses : docker/metadata-action@v5
4453 with :
4554 images : ${{ env.REGISTRY }}/${{ inputs.container-name }}
55+ context : git
4656 tags : |
4757 type=ref,event=branch
4858 type=sha
49- type=sha,format=long
59+ type=sha,format=long,prefix=
5060 type=ref,event=pr
61+ type=raw,value=${{ inputs.pr-head-sha }},enable=${{ inputs.pr-head-sha != '' }}
5162 type=raw,value=${{ inputs.branch }},enable=${{ github.event_name == 'workflow_dispatch' }}
5263 type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
53-
64+
5465 - name : Build and push Docker image
5566 uses : docker/build-push-action@v6
5667 with :
You can’t perform that action at this time.
0 commit comments