Follow up - 0798e7d47e - 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.

This commit is contained in:
Thorsten Eckel 2020-03-11 09:18:44 +01:00
parent bb7950255e
commit 51ce176c2d
2 changed files with 7 additions and 3 deletions

View file

@ -13,9 +13,11 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_REPOSITORY: "zammad-docker-compose" DOCKER_REPOSITORY: "zammad-docker-compose"
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REPO_USER: ${{ secrets.REPO_USER }}
steps: 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 uses: actions/checkout@master
- name: Fetch all history for all tags and branches - name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow run: git fetch --prune --unshallow

View file

@ -13,8 +13,10 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_REPOSITORY: "zammad" DOCKER_REPOSITORY: "zammad"
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REPO_USER: ${{ secrets.REPO_USER }}
steps: steps:
- name: Alias GITHUB_ACTOR as REPO_USER
run: |
echo "::set-env name=REPO_USER::$GITHUB_ACTOR"
- name: Checkout code - name: Checkout code
uses: actions/checkout@master uses: actions/checkout@master
- name: Fetch all history for all tags and branches - name: Fetch all history for all tags and branches