Skip to content

Update build action to create a docker tags automatically for all branches #45

Update build action to create a docker tags automatically for all branches

Update build action to create a docker tags automatically for all branches #45

Workflow file for this run

# Build docker image
name: Build
on:
release:
types: [published]
pull_request:
jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract tag name
id: vars
run: |
TAG=${{ github.event_name == 'release' && github.ref_name || github.head_ref }}
echo $TAG
TAG=${TAG//\/\#/-}
TAG=${TAG//\//-}
TAG=${TAG//\#/-}
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Build and publish docker image
uses: docker/[email protected]
with:
repository: faforever/faf-python-server
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
build_args: GITHUB_REF=${{ steps.vars.outputs.tag }}
tag_with_ref: true