File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : build-container-images
3+
4+ on :
5+ workflow_dispatch :
6+ pull_request :
7+ paths :
8+ - " go/dexop/**"
9+ push :
10+ tags :
11+ - dexop-*
12+ paths :
13+ - " go/dexop/**"
14+ merge_group :
15+ types : [checks_requested]
16+
17+ jobs :
18+ build-ghcr-registry :
19+ runs-on : ubuntu-latest
20+ permissions :
21+ packages : write
22+ contents : read
23+ steps :
24+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
25+ - name : Set up Docker Buildx
26+ uses : docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
27+
28+ - name : Login to ghcr.io
29+ uses : docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
30+ with :
31+ registry : " ghcr.io"
32+ username : ${{ github.actor }}
33+ password : ${{ secrets.GITHUB_TOKEN }}
34+
35+ - name : Extract tag name
36+ id : extract_tag
37+ run : echo "DEXOP_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
38+
39+ - name : Build and deploy Dexop image
40+ uses : docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6
41+ with :
42+ context : go/dexop/
43+ file : go/dexop/Dockerfile
44+ # push for all main branch commits
45+ push : ${{ github.event_name != 'pull_request' }}
46+ tags : ghcr.io/${{ github.repository }}/dexop:latest,ghcr.io/${{ github.repository }}/dexop:${{ env.DEXOP_VERSION }}
47+ labels : |
48+ org.opencontainers.image.version=${{ env.DEXOP_VERSION }}
You can’t perform that action at this time.
0 commit comments