fix: docker-release GHA fails with pathspec error (#27925)

This commit is contained in:
Maxime Beauchemin 2024-04-08 09:45:47 -07:00 committed by GitHub
parent c5b7f7a08c
commit 5377b6cb2f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 3 deletions

View File

@ -55,10 +55,19 @@ jobs:
uses: actions/checkout@v4
with:
persist-credentials: false
tags: true
fetch-depth: 0
- name: Setup supersetbot
uses: ./.github/actions/setup-supersetbot/
- name: Try to login to DockerHub
continue-on-error: true
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Execute custom Node.js script
env:
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
@ -73,10 +82,7 @@ jobs:
if [ "${{ github.event.inputs.force-latest }}" = "true" ]; then
FORCE_LATEST="--force-latest"
fi
# build_docker.py may not exist on that SHA, let's switcharoo to /tmp
cp ./scripts/build_docker.py /tmp
git checkout "${{ github.event.inputs.git-ref }}"
cp /tmp/build_docker.py scripts/
EVENT="release"
fi
@ -86,3 +92,9 @@ jobs:
--context-ref "$RELEASE" $FORCE_LATEST \
--platform "linux/arm64" \
--platform "linux/amd64"
# Going back on original branch to allow "post" GHA operations
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
uses: actions/checkout@v4
with:
persist-credentials: false