Skip to content

chore(deps): update actions/checkout action to v4 #64

chore(deps): update actions/checkout action to v4

chore(deps): update actions/checkout action to v4 #64

Workflow file for this run

name: Build
on:
pull_request:
push:
branches:
- master
tags:
- '*'
files:
- image-server
jobs:
build-and-push:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # 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@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
# dependencies needed for building are amd64 only
# platforms: linux/amd64,linux/arm64
platforms: linux/amd64
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 }}