Follow up - 0798e7d47e
- moved from circle ci to github actions. Fixed bug: GITHUB_ACTOR is the user initiating the commit not the repository owner. Applied workaround to extract the repository owner from the GitHub Actions GITHUB_REPOSITORY ENV instead because there is no dedicated ENV for that.
This commit is contained in:
parent
51ce176c2d
commit
dd96c57f48
3 changed files with 8 additions and 8 deletions
4
.github/docker-image-build.sh
vendored
4
.github/docker-image-build.sh
vendored
|
@ -13,7 +13,9 @@ ZAMMAD_VERSION="$(git describe --tags | sed -e 's/-[a-z0-9]\{8,\}.*//g')"
|
|||
echo "${DOCKER_PASSWORD}" | docker login --username="${DOCKER_USERNAME}" --password-stdin
|
||||
|
||||
# clone docker repo
|
||||
git clone https://github.com/"${REPO_USER}"/"${DOCKER_GITHUB_REPOSITORY}"
|
||||
DOCKER_REPOSITORY_CLONE_URL="https://github.com/${REPO_USER}/${DOCKER_GITHUB_REPOSITORY}"
|
||||
echo "Cloning ${DOCKER_REPOSITORY_CLONE_URL}"
|
||||
git clone "${DOCKER_REPOSITORY_CLONE_URL}"
|
||||
|
||||
# enter dockerfile dir
|
||||
cd "${REPO_ROOT}/${DOCKER_GITHUB_REPOSITORY}"
|
||||
|
|
|
@ -14,10 +14,9 @@ jobs:
|
|||
DOCKER_REPOSITORY: "zammad-docker-compose"
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
steps:
|
||||
- name: Alias GITHUB_ACTOR as REPO_USER
|
||||
run: |
|
||||
echo "::set-env name=REPO_USER::$GITHUB_ACTOR"
|
||||
- name: Checkout code
|
||||
- name: Extract REPO_USER from GITHUB_REPOSITORY ENV
|
||||
run: echo "::set-env name=REPO_USER::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')"
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
- name: Fetch all history for all tags and branches
|
||||
run: git fetch --prune --unshallow
|
||||
|
|
5
.github/workflows/build-docker-image.yaml
vendored
5
.github/workflows/build-docker-image.yaml
vendored
|
@ -14,9 +14,8 @@ jobs:
|
|||
DOCKER_REPOSITORY: "zammad"
|
||||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||
steps:
|
||||
- name: Alias GITHUB_ACTOR as REPO_USER
|
||||
run: |
|
||||
echo "::set-env name=REPO_USER::$GITHUB_ACTOR"
|
||||
- name: Extract REPO_USER from GITHUB_REPOSITORY ENV
|
||||
run: echo "::set-env name=REPO_USER::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')"
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@master
|
||||
- name: Fetch all history for all tags and branches
|
||||
|
|
Loading…
Reference in a new issue