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 : moq-interop-image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - ' .github/workflows/moq-interop-image.yml'
9+ - ' moq-interop/**'
10+ workflow_dispatch :
11+
12+ concurrency :
13+ group : moq-interop-image-${{ github.ref }}
14+ cancel-in-progress : true
15+
16+ env :
17+ IMAGE_NAME : ghcr.io/${{ github.repository_owner }}/moq-interop
18+
19+ jobs :
20+ docker :
21+ runs-on : ubuntu-latest
22+ permissions :
23+ contents : read
24+ packages : write
25+ steps :
26+ - name : Check out repository
27+ uses : actions/checkout@v4
28+
29+ - name : Set up QEMU
30+ uses : docker/setup-qemu-action@v3
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@v3
34+
35+ - name : Log in to GHCR
36+ uses : docker/login-action@v3
37+ with :
38+ registry : ghcr.io
39+ username : ${{ github.actor }}
40+ password : ${{ secrets.GITHUB_TOKEN }}
41+
42+ - name : Extract Docker metadata
43+ id : meta
44+ uses : docker/metadata-action@v5
45+ with :
46+ images : ${{ env.IMAGE_NAME }}
47+ tags : |
48+ type=raw,value=latest,enable={{is_default_branch}}
49+ type=sha
50+
51+ - name : Build and push container image
52+ uses : docker/build-push-action@v6
53+ with :
54+ context : ./moq-interop
55+ file : ./moq-interop/docker/Dockerfile
56+ platforms : linux/amd64
57+ push : true
58+ tags : ${{ steps.meta.outputs.tags }}
59+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments