File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Image Checks
2+
3+ on :
4+ push :
5+ # Run only on release pushes
6+ tags :
7+ - v*
8+ # but all PRs
9+ pull_request :
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Docker Buildx
19+ uses : docker/setup-buildx-action@v3
20+
21+ - name : Build image
22+ uses : docker/build-push-action@v5
23+ with :
24+ context : .
25+ cache-from : type=gha
26+ cache-to : type=gha
27+ tags : ci_test
28+ load : true
29+
30+ - name : Login to GHCR
31+ if : ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
32+ uses : docker/login-action@v3
33+ with :
34+ registry : ghcr.io/${{ github.repository_owner }}
35+ username : ${{ github.actor }}
36+ password : ${{ secrets.GITHUB_TOKEN }}
37+
38+ - name : Publish image
39+ if : ${{ github.event_name == 'push' && github.ref_type == 'tag' }}
40+ uses : docker/build-push-action@v5
41+ with :
42+ context : .
43+ tags : ${{ github.ref_name }}
44+ push : true
You can’t perform that action at this time.
0 commit comments