From 51ce176c2d7ff77c22eee332d6655647b5d79ace Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Wed, 11 Mar 2020 09:18:44 +0100 Subject: [PATCH] Follow up - 0798e7d47ed2505ea43dccdb9c1ef867d700f720 - moved from circle ci to github actions. Fixed bug: Can't use GitHub repository secret as GitHub Actions ENV for `git` checkout command. Migrated to given GITHUB_ACTOR GitHub Action ENV and aliased it to have the possibility to change it in the corresponding workflow YAML (e.g. for testing purposes). There is a workaround needed because aliasing an ENV is not possible. --- .github/workflows/build-docker-compose-images.yaml | 6 ++++-- .github/workflows/build-docker-image.yaml | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker-compose-images.yaml b/.github/workflows/build-docker-compose-images.yaml index 5959dbcc3..2e98d09c2 100644 --- a/.github/workflows/build-docker-compose-images.yaml +++ b/.github/workflows/build-docker-compose-images.yaml @@ -13,9 +13,11 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_REPOSITORY: "zammad-docker-compose" DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - REPO_USER: ${{ secrets.REPO_USER }} steps: - - name: Checkout code + - name: Alias GITHUB_ACTOR as REPO_USER + run: | + echo "::set-env name=REPO_USER::$GITHUB_ACTOR" + - name: Checkout code uses: actions/checkout@master - name: Fetch all history for all tags and branches run: git fetch --prune --unshallow diff --git a/.github/workflows/build-docker-image.yaml b/.github/workflows/build-docker-image.yaml index 9e9cf9086..a1a4e8389 100644 --- a/.github/workflows/build-docker-image.yaml +++ b/.github/workflows/build-docker-image.yaml @@ -13,8 +13,10 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_REPOSITORY: "zammad" DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - REPO_USER: ${{ secrets.REPO_USER }} steps: + - name: Alias GITHUB_ACTOR as REPO_USER + run: | + echo "::set-env name=REPO_USER::$GITHUB_ACTOR" - name: Checkout code uses: actions/checkout@master - name: Fetch all history for all tags and branches