mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 15:33:09 +00:00
Ensure login occurs *before* setup-buildx, as some buildx commands appear to be unauthenticated.
This commit is contained in:
36
.github/workflows/reusable-docker-build.yml
vendored
36
.github/workflows/reusable-docker-build.yml
vendored
@@ -105,29 +105,29 @@ jobs:
|
|||||||
- name: Checkout codebase
|
- name: Checkout codebase
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# https://github.com/docker/setup-buildx-action
|
# https://github.com/docker/login-action
|
||||||
- name: Setup Docker Buildx
|
- name: Login to DockerHub
|
||||||
uses: docker/setup-buildx-action@v3
|
# Only login if not a PR, as PRs only trigger a Docker build and not a push
|
||||||
|
if: ${{ ! matrix.isPr }}
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
|
|
||||||
# https://github.com/docker/setup-qemu-action
|
# https://github.com/docker/setup-qemu-action
|
||||||
- name: Set up QEMU emulation to build for multiple architectures
|
- name: Set up QEMU emulation to build for multiple architectures
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
# https://github.com/docker/setup-buildx-action
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
#------------------------------------------------------------
|
#------------------------------------------------------------
|
||||||
# Build & deploy steps for new commits to a branch (non-PRs)
|
# Build & deploy steps for new commits to a branch (non-PRs)
|
||||||
#
|
#
|
||||||
# These steps build the images, push to DockerHub, and
|
# These steps build the images, push to DockerHub, and
|
||||||
# (if necessary) redeploy demo/sandbox sites.
|
# (if necessary) redeploy demo/sandbox sites.
|
||||||
#------------------------------------------------------------
|
#------------------------------------------------------------
|
||||||
# https://github.com/docker/login-action
|
|
||||||
- name: Login to DockerHub
|
|
||||||
# Only login if not a PR, as PRs only trigger a Docker build and not a push
|
|
||||||
if: ${{ ! matrix.isPr }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
||||||
|
|
||||||
# https://github.com/docker/metadata-action
|
# https://github.com/docker/metadata-action
|
||||||
# Get Metadata for docker_build_deps step below
|
# Get Metadata for docker_build_deps step below
|
||||||
- name: Sync metadata (tags, labels) from GitHub to Docker for image
|
- name: Sync metadata (tags, labels) from GitHub to Docker for image
|
||||||
@@ -257,6 +257,12 @@ jobs:
|
|||||||
pattern: digests-${{ inputs.build_id }}-*
|
pattern: digests-${{ inputs.build_id }}-*
|
||||||
merge-multiple: true
|
merge-multiple: true
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@@ -268,12 +274,6 @@ jobs:
|
|||||||
tags: ${{ env.IMAGE_TAGS }}
|
tags: ${{ env.IMAGE_TAGS }}
|
||||||
flavor: ${{ env.TAGS_FLAVOR }}
|
flavor: ${{ env.TAGS_FLAVOR }}
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create manifest list from digests and push
|
- name: Create manifest list from digests and push
|
||||||
working-directory: /tmp/digests
|
working-directory: /tmp/digests
|
||||||
run: |
|
run: |
|
||||||
|
Reference in New Issue
Block a user