File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Push Docker Image
2+
3+ on :
4+ push :
5+ branches : [ "reproducible" ]
6+ pull_request :
7+ branches : [ "reproducible" ]
8+
9+ env :
10+ REGISTRY : ghcr.io
11+ IMAGE_NAME : ${{ github.repository }}
12+
13+ jobs :
14+ build-and-push :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ contents : read
18+ packages : write
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Docker Buildx
25+ uses : docker/setup-buildx-action@v3
26+
27+ - name : Log in to the Container registry
28+ uses : docker/login-action@v3
29+ with :
30+ registry : ${{ env.REGISTRY }}
31+ username : ${{ github.actor }}
32+ password : ${{ secrets.GITHUB_TOKEN }}
33+
34+ - name : Build and push
35+ uses : docker/build-push-action@v5
36+ with :
37+ context : .
38+ push : ${{ github.event_name != 'pull_request' }}
39+ tags : |
40+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
41+ ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
You can’t perform that action at this time.
0 commit comments