[fix] DOCKERHUB_USERNAME env reference
When I was doing the container rework I unknowingly deleted the section where an env was defined for the job, making it look like it was originally defined directly from the organization. Since I can't validate the secrets in the condition directly, it's better to let `docker/login-action` take care of failing the entire job if they are invalid and fail to login to registry. Reported in: https://github.com/searxng/searxng/issues/4777
This commit is contained in:
parent
750a7b4d6f
commit
9b8042a4a1
14
.github/workflows/container.yml
vendored
14
.github/workflows/container.yml
vendored
@ -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 }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user