Merge pull request #3437 from mdnoble73/25.12.00 #2693
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Docker image to hub.docker.com | |
| on: | |
| push | |
| jobs: | |
| build_aspen_docker_images: | |
| name: Push Aspen image to GitHub Container Registry | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract GitHub Tag | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| id: extract_tag | |
| run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Add placeholder if this is not a tag | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| id: extract_tag_dummy | |
| run: echo "GIT_TAG=NOTHING" >> $GITHUB_ENV | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Log in to Docker Hub | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GHCR | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin | |
| - name: Log in to Quay.io | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| tags: | | |
| aspendiscovery/aspen:latest | |
| ghcr.io/aspen-discovery/aspen:latest | |
| quay.io/aspen-discovery/aspen:latest | |
| aspendiscovery/aspen:${{ env.GIT_TAG }} | |
| ghcr.io/aspen-discovery/aspen:${{ env.GIT_TAG }} | |
| quay.io/aspen-discovery/aspen:${{ env.GIT_TAG }} | |
| build_solr_docker_images: | |
| name: Push Aspen image to GitHub Container Registry | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract GitHub Tag | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| id: extract_tag | |
| run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Add placeholder if this is not a tag | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| id: extract_tag_dummy | |
| run: echo "GIT_TAG=NOTHING" >> $GITHUB_ENV | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Log in to Docker Hub | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GHCR | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin | |
| - name: Log in to Quay.io | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/files/solr/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| tags: | | |
| aspendiscovery/solr:latest | |
| ghcr.io/aspen-discovery/solr:latest | |
| quay.io/aspen-discovery/solr:latest | |
| aspendiscovery/solr:${{ env.GIT_TAG }} | |
| ghcr.io/aspen-discovery/solr:${{ env.GIT_TAG }} | |
| quay.io/aspen-discovery/solr:${{ env.GIT_TAG }} | |
| build_tunnel_docker_images: | |
| name: Push Aspen image to GitHub Container Registry | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Extract GitHub Tag | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| id: extract_tag | |
| run: echo "GIT_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Add placeholder if this is not a tag | |
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| id: extract_tag_dummy | |
| run: echo "GIT_TAG=NOTHING" >> $GITHUB_ENV | |
| - name: Extract branch name | |
| shell: bash | |
| run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
| id: extract_branch | |
| - name: Log in to Docker Hub | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GHCR | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin | |
| - name: Log in to Quay.io | |
| if: github.repository == 'Aspen-Discovery/aspen-discovery' | |
| uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
| with: | |
| registry: quay.io | |
| username: ${{ secrets.QUAY_USERNAME }} | |
| password: ${{ secrets.QUAY_PASSWORD }} | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/files/tunnel/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| tags: | | |
| aspendiscovery/tunnel:latest | |
| ghcr.io/aspen-discovery/tunnel:latest | |
| quay.io/aspen-discovery/tunnel:latest | |
| aspendiscovery/tunnel:${{ env.GIT_TAG }} | |
| ghcr.io/aspen-discovery/tunnel:${{ env.GIT_TAG }} | |
| quay.io/aspen-discovery/tunnel:${{ env.GIT_TAG }} |