This is an automated email from the ASF dual-hosted git repository. sciabarracom pushed a commit to branch 0.9.0 in repository https://gitbox.apache.org/repos/asf/openserverless-devcontainer.git
commit 7dbfb02ebc4e3b270c46c70dd7834de09986e9b5 Author: Michele Sciabarra <[email protected]> AuthorDate: Fri Sep 4 19:58:15 2026 +0200 reworked credentials --- .github/workflows/image.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index f88ddcd..6849987 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -77,18 +77,27 @@ jobs: REGISTRY="ghcr.io" fi echo "REGISTRY=$REGISTRY" >> "$GITHUB_ENV" + - name: Select registry credentials + run: | + if [ "${REGISTRY%%/*}" = "ghcr.io" ]; then + echo "REGISTRY_USER=${{ github.actor }}" >> "$GITHUB_ENV" + echo "REGISTRY_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV" + else + echo "REGISTRY_USER=${{ secrets.DOCKERHUB_USER }}" >> "$GITHUB_ENV" + echo "REGISTRY_TOKEN=${{ secrets.DOCKERHUB_TOKEN }}" >> "$GITHUB_ENV" + fi - name: Registry login - uses: docker/login-action@v4 + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0 with: registry: ${{ env.REGISTRY }} - username: ${{ secrets.DOCKERHUB_USER || github.repository_owner }} - password: ${{ secrets.DOCKERHUB_TOKEN || secrets.GITHUB_TOKEN }} + username: ${{ env.REGISTRY_USER }} + password: ${{ env.REGISTRY_TOKEN }} - name: Set up QEMU - uses: docker/setup-qemu-action@v4 + uses: docker/setup-qemu-action@1f40c72289eff860ee54a304f1438e3cff362e0a # v4.3.0 with: image: tonistiigi/binfmt:qemu-v7.0.0-28 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v4 + uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 - name: Image run: task buildx PUSH=1 DEVCONTAINER_TAG=$IMG_TAG
