Skip to content

build-container

build-container #68

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 }}