mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
aider: This change corrected the conditional expression for the Docker login step by removing the incorrect ${{ }}
around secrets.DOCKERHUB_USERNAME
and secrets.DOCKERHUB_PASSWORD
and adding a check for the github.event_name
to ensure that the login step is only executed when it's not a pull request or when the secrets are available.
# Aider chat conversation: USER: The workflow is not valid. .github/workflows/docker-build-test.yml (Line: 30, Col: 11): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.DOCKERHUB_USERNAME ASSISTANT: ```diff --- .github/workflows/docker-build-test.yml +++ .github/workflows/docker-build-test.yml @@ ... @@ uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - if: ${{ secrets.DOCKERHUB_USERNAME }} && ${{ secrets.DOCKERHUB_PASSWORD }} + if: ${{ github.event_name != 'pull_request' || (secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD) }} ``` This change corrects the conditional expression for the Docker login step by removing the incorrect `${{ }}` around `secrets.DOCKERHUB_USERNAME` and `secrets.DOCKERHUB_PASSWORD` and adding a check for the `github.event_name` to ensure that the login step is only executed when it's not a pull request or when the secrets are available.
This commit is contained in:
parent
15c915e481
commit
1b43dddec5
1 changed files with 1 additions and 1 deletions
2
.github/workflows/docker-build-test.yml
vendored
2
.github/workflows/docker-build-test.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
if: ${{ secrets.DOCKERHUB_USERNAME }} && ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
if: ${{ github.event_name != 'pull_request' || (secrets.DOCKERHUB_USERNAME && secrets.DOCKERHUB_PASSWORD) }}
|
||||
|
||||
- name: Build Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue