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 : docker-build
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v6
21+
22+ - name : Log in to GitHub Container Registry
23+ if : github.event_name != 'pull_request'
24+ uses : docker/login-action@v4
25+ with :
26+ registry : ${{ env.REGISTRY }}
27+ username : ${{ github.actor }}
28+ password : ${{ secrets.GITHUB_TOKEN }}
29+
30+ - name : Set up Docker Buildx
31+ uses : docker/setup-buildx-action@v4
32+
33+ - name : Build and push Docker image
34+ uses : docker/build-push-action@v7
35+ with :
36+ context : .
37+ platforms : linux/amd64, linux/arm64
38+ push : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
39+ tags : ghcr.io/floatingmilkshake/mechanicalmilkshake:latest
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments