-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (39 loc) · 1.23 KB
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Docker
on: push
jobs:
docker:
name: GitHub Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/beattogether/beat-together-status-api
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- uses: docker/setup-buildx-action@v2
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
- uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
dotnet-version: 7.0.x