Skip to content

olbase

olbase #175

Workflow file for this run

name: olbase
on:
schedule:
- cron: '00 16 * * 2'
workflow_dispatch:
permissions:
contents: read
jobs:
docker:
if: github.repository_owner == 'internetarchive'
runs-on: ubuntu-latest
env:
# To test this GitHub action, you can create an upstream branch, and manually trigger
# it from GitHub. The tag name of the image will be your branch name, so don't use
# any weird characters. Note this will not work with a fork ; you need an upstream branch!
TAG_NAME: ${{ github.ref == 'refs/heads/master' && 'latest' || github.ref_name }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push amd64
uses: docker/build-push-action@v6
with:
context: "."
file: "./docker/Dockerfile.olbase"
platforms: linux/amd64
tags: openlibrary/olbase:${{ env.TAG_NAME }}
push: true
docker-arm64:
if: github.repository_owner == 'internetarchive'
runs-on: ubuntu-24.04-arm
env:
TAG_NAME: ${{ github.ref == 'refs/heads/master' && 'latest' || github.ref_name }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: "."
file: "./docker/Dockerfile.olbase"
platforms: linux/arm64
tags: openlibrary/olbase:${{ env.TAG_NAME }}-arm64
push: true
combine-manifests:
needs: [docker, docker-arm64]
runs-on: ubuntu-latest
if: github.repository_owner == 'internetarchive'
env:
TAG_NAME: ${{ github.ref == 'refs/heads/master' && 'latest' || github.ref_name }}
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Combine the manifests of the amd and arm images in a manifest
run: |
# Pull out the digests
AMD64_DIGEST=$(docker manifest inspect openlibrary/olbase:${{ env.TAG_NAME }} | jq -r '.manifests[0].digest')
ARM64_DIGEST=$(docker manifest inspect openlibrary/olbase:${{ env.TAG_NAME }}-arm64 | jq -r '.manifests[0].digest')
docker manifest create openlibrary/olbase:${{ env.TAG_NAME }} \
openlibrary/olbase@${AMD64_DIGEST} \
openlibrary/olbase@${ARM64_DIGEST}
docker manifest annotate openlibrary/olbase:${{ env.TAG_NAME }} openlibrary/olbase@${AMD64_DIGEST}
docker manifest annotate openlibrary/olbase:${{ env.TAG_NAME }} openlibrary/olbase@${ARM64_DIGEST}
docker manifest push openlibrary/olbase:${{ env.TAG_NAME }}