-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 1.93 KB
/
docker.yml
File metadata and controls
69 lines (66 loc) · 1.93 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Upload To Container Registry
on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
name: Build (x64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
working-directory: ./VRAtlas
run: dotnet restore
- name: Build
working-directory: ./VRAtlas
run: dotnet build --no-restore
docker:
name: Upload (x64)
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Registry Login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Format Image Name
run: |
echo "TARGET_IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
- name: Build Image
working-directory: ./VRAtlas
run: docker build -t ${{ env.REGISTRY }}/${{ env.TARGET_IMAGE_NAME }}:main ../
- name: Publish Image
run: docker push ${{ env.REGISTRY }}/${{ env.TARGET_IMAGE_NAME }} --all-tags
docker-arm:
name: Upload (ARM)
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Registry Login
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Format Image Name
run: |
echo "TARGET_IMAGE_NAME=${IMAGE_NAME,,}" >>${GITHUB_ENV}
- name: Build Image
working-directory: ./VRAtlas
run: docker build -t ${{ env.REGISTRY }}/${{ env.TARGET_IMAGE_NAME }}:alpine-arm64 -f ../Dockerfile.alpine-arm64 ../
- name: Publish Image
run: docker push ${{ env.REGISTRY }}/${{ env.TARGET_IMAGE_NAME }} --all-tags