Fix Docker Hub login condition in CI workflow
Replace invalid secrets check in if-condition with a repository variable (vars.DOCKERHUB_ENABLED) to avoid workflow file parsing errors.
This commit is contained in:
2
.github/workflows/docker-publish.yml
vendored
2
.github/workflows/docker-publish.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
|||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
if: github.event_name != 'pull_request' && secrets.DOCKERHUB_USERNAME != ''
|
if: github.event_name != 'pull_request' && vars.DOCKERHUB_ENABLED == 'true'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
|||||||
Reference in New Issue
Block a user