Skip to content

Rely on updated AstroTuxLauncher genconfig #19

Rely on updated AstroTuxLauncher genconfig

Rely on updated AstroTuxLauncher genconfig #19

name: Build and Push Container Images
on:
push:
branches:
- main
- dev
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_GHCR: ghcr.io/${{ github.repository_owner }}/astroneer-server
IMAGE_DOCKERIO: docker.io/${{ vars.DOCKERHUB_USERNAME }}/astroneer-server
IMAGE_TAG: |-
${{
github.ref_name == 'main' && 'latest'
|| github.ref_name == 'dev' && 'experimental'
|| 'unknown'
}}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to docker.io
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push image
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t $IMAGE_GHCR:$IMAGE_TAG \
-t $IMAGE_DOCKERIO:$IMAGE_TAG \
--push .