chore(deps): update dependency ubuntu to v24 #127
This file contains 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: Build | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
# This seems to work faster than pulling during docker compose up | |
- name: Pull images | |
run: docker compose pull --quiet | |
- name: Bring up image image-server | |
run: docker compose up --wait | |
- name: Test image-server | |
run: curl -fI http://localhost:8182/iiif/2/515698v2_fig1.tif/full/full/0/default.jpg | |
build-and-push: | |
runs-on: ubuntu-22.04 | |
needs: [test] | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date --utc +%Y%m%d.%H%M)" | |
- name: Get sha with 8 chars long | |
id: commit_sha | |
run: echo "::set-output name=commit_sha::${GITHUB_SHA:0:8}" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
# dependencies needed for building are amd64 only | |
platforms: linux/amd64,linux/arm64 | |
tags: | | |
ghcr.io/elifesciences/epp-image-server:latest | |
ghcr.io/elifesciences/epp-image-server:master-${{ steps.commit_sha.outputs.commit_sha }}-${{ steps.date.outputs.date }} |