fix ghcr workflow throw error when in the fork repo. (#1203)

* fix ghcr workflow throw error when in the fork repo.

* Split DOCKER_REPOSITORY for cleaner.
This commit is contained in:
Leo
2024-04-19 23:06:25 +08:00
committed by GitHub
parent b9bed7da8d
commit 34286fabcc
5 changed files with 18 additions and 5 deletions

View File

@@ -32,4 +32,6 @@ jobs:
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push ${{ matrix.image }}
run: ./containers/build.sh ${{ matrix.image }} --push
run: |
ORG_NAME=$(echo "${{ github.repository }}" | tr '[A-Z]' '[a-z]' | cut -d '/' -f 1)
./containers/build.sh ${{ matrix.image }} $ORG_NAME --push