Skip to content

remove remove-supplementary-materials.xsl (#159) #414

remove remove-supplementary-materials.xsl (#159)

remove remove-supplementary-materials.xsl (#159) #414

name: Verify XSLT transforms
on:
pull_request:
push:
branches:
- master
tags:
- '*'
jobs:
documentation-check:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check for entry for each XSL in documentation
run: ./scripts/verify-documentation.sh
project-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run tests in docker container
run: |
docker buildx build -t epp-biorxiv-xslt:test --target test .
docker run --rm epp-biorxiv-xslt:test
build-and-push:
needs: [project-tests]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- 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
run: |
GITHASH=$(git log -1 --pretty=format:"%H")
GITSHORTHASH=$(git log -1 --pretty=format:"%H" | head -c 8)
DATETIME=$(date -u '+%Y%m%d.%H%M')
GITBRANCH=$(git branch --show-current)
docker buildx build \
-t ghcr.io/elifesciences/enhanced-preprints-biorxiv-xslt:latest \
-t ghcr.io/elifesciences/enhanced-preprints-biorxiv-xslt:$GITHASH \
-t ghcr.io/elifesciences/enhanced-preprints-biorxiv-xslt:$GITBRANCH-$GITSHORTHASH-$DATETIME \
--platform linux/amd64,linux/arm64 --push .