Skip to content

Build

Build #54

Workflow file for this run

# Build docker image
name: Build
on:
release:
types: [published]
workflow_dispatch:
inputs:
repository:
description: Repository
ref:
description: Ref
tag:
description: Tag
required: true
default: faforever/faf-python-server:latest
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: faforever/faf-python-server
tags:
type=semver,pattern={{raw}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and publish docker image
uses: docker/build-push-action@v6
with:
build-args: GITHUB_REF=${{ github.ref_name }}
tags: ${{ inputs.tag || steps.meta.outputs.tags }}
push: true