diff options
| author | Ivan Gabaldon <igabaldon@inetol.net> | 2025-05-12 23:43:47 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-12 23:43:47 +0200 |
| commit | 5d99373bc65c7087ee743a1fe44897bad6065338 (patch) | |
| tree | b3636999bad1161e47826a9ef59b0e9111eaeece /.github/workflows/container.yml | |
| parent | 945b30a1c459e6b437a3f379e638c2002a81fcab (diff) | |
[fix] DOCKERHUB_USERNAME env reference (#4778)
When making the container rework, I unknowingly deleted the section where an env with the same name as the secret was defined on the job scope, making it look like it was originally defined as an organization env.
Since we can't validate the secrets in a condition directly, it's better to let docker/login-action take care of failing the entire job if the credentials are invalid.
Reported in: https://github.com/searxng/searxng/issues/4777
Diffstat (limited to '.github/workflows/container.yml')
| -rw-r--r-- | .github/workflows/container.yml | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index ee1093acb..ef92a0662 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -153,30 +153,26 @@ jobs: - test steps: - - if: env.DOCKERHUB_USERNAME != null - name: Checkout + - name: Checkout uses: actions/checkout@v4 with: persist-credentials: "false" - - if: env.DOCKERHUB_USERNAME != null - name: Login to GHCR + - name: Login to GHCR uses: docker/login-action@v3 with: registry: "ghcr.io" username: "${{ github.repository_owner }}" password: "${{ secrets.GITHUB_TOKEN }}" - - if: env.DOCKERHUB_USERNAME != null - name: Login to Docker Hub + - name: Login to Docker Hub uses: docker/login-action@v3 with: registry: "docker.io" - username: "${{ env.DOCKERHUB_USERNAME }}" + username: "${{ secrets.DOCKERHUB_USERNAME }}" password: "${{ secrets.DOCKERHUB_TOKEN }}" - - if: env.DOCKERHUB_USERNAME != null - name: Release + - name: Release env: GIT_URL: "${{ needs.build.outputs.git_url }}" DOCKER_TAG: "${{ needs.build.outputs.docker_tag }}" |