From cef7cc2ad6198b5d5356a9b567a393669ffb50ce Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Fri, 30 Jul 2021 19:06:56 +0000 Subject: [PATCH] build(gha): allow releases to be made --- .github/workflows/ci.yml | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 943ea90..77a6f81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,20 +40,26 @@ jobs: - name: Build and push Docker image run: make docker-release - # build-release: - # runs-on: self-hosted - # needs: [test] - # if: contains(github.ref, 'refs/tags/') - # steps: - # - uses: actions/checkout@v2 - # with: - # fetch-depth: 0 + build-release: + runs-on: ubuntu-20.04 + needs: [test] + if: contains(github.ref, 'refs/tags/') + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Parse git ref + run: | + echo "DOCKER_TAG_NAME=$(basename $GITHUB_REF)" >> $GITHUB_ENV - # - name: Parse git ref - # run: | - # echo "DOCKER_TAG_VERSION=$(basename $GITHUB_REF)" >> $GITHUB_ENV + - name: Log in to the Container registry + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - # - name: Build and push Docker image - # run: make docker-release - # env: - # DOCKER_TAG_NAME: "latest" + - name: Build and push Docker image + run: make docker-release + env: + DOCKER_TAG_NAME: "latest"