-
Notifications
You must be signed in to change notification settings - Fork 11
51 lines (45 loc) · 1.42 KB
/
container-publish.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
49
50
51
name: build-container
on:
workflow_dispatch:
schedule:
- cron: '22 5 22 * *'
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- id: string
uses: ASzc/change-string-case-action@v6
with:
string: XCSoar
- name: build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
context: ./
file: ./container/worker/Dockerfile
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/mapgen-worker:latest
secrets: |
GIT_AUTH_TOKEN=${{ github.token }}
- name: build and push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
context: ./
file: ./container/frontend/Dockerfile
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/mapgen-frontend:latest
secrets: |
GIT_AUTH_TOKEN=${{ github.token }}