File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : container
2+ on :
3+ push :
4+ branches : [main]
5+ workflow_dispatch :
6+ permissions :
7+ contents : read
8+ packages : write
9+ pages : write
10+ id-token : write
11+ concurrency :
12+ group : pages
13+ cancel-in-progress : false
14+ env :
15+ CONTAINER_REGISTRY : ghcr.io
16+ CONTAINER_IMAGE : ghcr.io/${{ github.actor}}/${{ github.event.repository.name }}
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+ - name : Log in to Docker Registry
26+ uses : docker/login-action@v3
27+ with :
28+ registry : ${{ env.CONTAINER_REGISTRY }}
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+ - name : Set up Docker Buildx
32+ uses : docker/setup-buildx-action@v3
33+ - name : Set up QEMU
34+ uses : docker/setup-qemu-action@v3
35+ - name : Build and push docker image
36+ uses : docker/build-push-action@v6
37+ with :
38+ push : true
39+ tags : |
40+ ${{ env.CONTAINER_IMAGE }}:latest
41+ ${{ env.CONTAINER_IMAGE }}${{ github.sha }}
42+ cache-from : type=registry,ref=${{ github.actor}}/${{ github.event.repository.name }}:latest
43+ cache-to : type=inline
You can’t perform that action at this time.
0 commit comments