-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.42 KB
/
api.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
40
41
42
43
44
45
46
47
48
name: .NET
on:
push:
branches: [ "master" ]
paths:
- 'src/Argon.Api/**'
pull_request:
branches: [ "master" ]
paths:
- 'src/Argon.Api/**'
jobs:
build:
# if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PWD }}
- name: Build and push images
run: |
export DOCKER_DEFAULT_PLATFORM=linux/arm64
export IMAGE_TAG=$(date +%s)
docker buildx ls
docker buildx inspect
docker build -t ${{ secrets.REGISTRY }}/argongg/api-orleans:$IMAGE_TAG -f ./src/Argon.Api/Dockerfile . --push
# docker tag ${{ secrets.REGISTRY }}/argongg/api:$IMAGE_TAG ${{ secrets.REGISTRY }}/argongg/api:latest
# docker push ${{ secrets.REGISTRY }}/argongg/api:latest