File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33on :
44 push :
5- branches : [main, master ]
5+ branches : [main]
66 pull_request :
7+ branches : [main]
78
89name : R-CMD-check.yaml
910
Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches : [main]
6+ tags : ['v*']
7+
8+ env :
9+ REGISTRY : ghcr.io
10+ IMAGE_NAME : ${{ github.repository_owner }}/autoflow
11+
12+ jobs :
13+ build-and-push :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v5
18+
19+ - name : Log in to GHCR
20+ uses : docker/login-action@v3
21+ with :
22+ registry : ${{ env.REGISTRY }}
23+ username : ${{ github.actor }}
24+ password : ${{ secrets.GITHUB_TOKEN }}
25+
26+ - name : Set up QEMU
27+ uses : docker/setup-qemu-action@v3
28+
29+ - name : Set up Docker Buildx
30+ uses : docker/setup-buildx-action@v3
31+
32+ - name : Extract metadata for Docker image
33+ id : meta
34+ uses : docker/metadata-action@v5
35+ with :
36+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+ tags : |
38+ type=ref,event=branch
39+ type=ref,event=pr
40+ type=semver,pattern={{version}}
41+ type=sha
42+ - name : Build and push
43+ uses : docker/build-push-action@v6
44+ with :
45+ context : ./docker
46+ file : ./docker/Dockerfile
47+ push : true
48+ tags : ${{ steps.meta.outputs.tags }}
49+ labels : ${{ steps.meta.outputs.labels }}
50+ cache-from : type=gha
51+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments