Skip to content

Commit

Permalink
Fix github release action (#716)
Browse files Browse the repository at this point in the history
* Fix build args parameter

* Only trigger when release published

* Get tag name from GITHUB_REF
  • Loading branch information
Askaholic authored Feb 6, 2021
1 parent 08d1d8f commit fd871db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ name: Build

on:
release:
types: [published, created, edited]
types: [published]

jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Extract tag name
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}

- name: Build and publish docker image
uses: docker/build-push-action@v1.1.1
with:
repository: faforever/faf-python-server
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
build-args: GITHUB_REF=${GITHUB_REF}
build_args: GITHUB_REF=${{ steps.vars.outputs.tag }}
tag_with_ref: true

0 comments on commit fd871db

Please sign in to comment.