44 release :
55 types : [published]
66
7- env :
8- USERNAME : ${{ github.repository_owner }}
9- IMAGE_NAME : ${{ github.repository }}
10- REGISTRY : ghcr.io
11-
127jobs :
138 update :
14- runs-on : ubuntu-latest
15-
16- steps :
17- - name : Checkout Repository
18- uses : actions/checkout@v4
19-
20- - name : Login to Registry
21- uses : docker/login-action@v3
22- with :
23- registry : ${{ env.REGISTRY }}
24- username : ${{ env.USERNAME }}
25- password : ${{ secrets.GH_PCKG_TOKEN }}
26-
27- - name : Setup QEMU
28- uses : docker/setup-qemu-action@v3
29-
30- - name : Setup Buildx
31- uses : docker/setup-buildx-action@v3
32-
33- - name : Extract Labels and Tags
34- id : meta
35- uses : docker/metadata-action@v5
36- with :
37- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
38- flavor : |
39- latest=false
40- tags : |
41- type=semver,pattern=v{{version}}
42- type=semver,pattern=v{{major}}
43- type=semver,pattern=v{{major}}.{{minor}}
44- type=semver,pattern=latest
45-
46- - name : Build and Push Image
47- uses : docker/build-push-action@v6
48- with :
49- context : .
50- platforms : linux/amd64, linux/arm64
51- tags : ${{ steps.meta.outputs.tags }}
52- labels : ${{ steps.meta.outputs.labels }}
53- push : true
9+ uses : codeshelldev/gh-actions/.github/workflows/docker-image.yaml@main
10+ with :
11+ registry : ghcr.io
12+ flavor : |
13+ latest=false
14+ tags : |
15+ type=semver,pattern=v{{major}}
16+ type=semver,pattern=v{{version}}
17+ type=semver,pattern=v{{major}}.{{minor}}
18+ type=semver,pattern=latest
19+ secrets :
20+ GH_PCKG_TOKEN : ${{ secrets.GH_PCKG_TOKEN }}
0 commit comments