Skip to content

Create a workflow to test and build the API-dummy image on github elifesciences/issues#9006 #25

Create a workflow to test and build the API-dummy image on github elifesciences/issues#9006

Create a workflow to test and build the API-dummy image on github elifesciences/issues#9006 #25

Workflow file for this run

name: CI Pipeline
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- master
jobs:
generate-version:
runs-on: ubuntu-latest
outputs:
trunkver: ${{ steps.trunkver.outputs.trunkver }}
steps:
- name: Get a version tag
id: trunkver
uses: crftd-tech/trunkver@main
with:
prerelease: ${{ github.ref == 'refs/heads/master' && 'false' || 'true' }}
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bring up test stack
run: docker compose up --wait
- name: Debug bring up test stack
if: failure()
run: docker compose logs
- name: Project Tests
run: docker compose exec app bash ./project_tests.sh
- name: Smoke Tests
run: docker compose exec app bash ./smoke_tests.sh
- name: Take down test stack
if: always()
run: docker compose down
build-and-push:
needs: [generate-version, tests]
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
env:
IMAGE_REPO: ghcr.io/elifesciences/api-dummy
BRANCH_PREFIX: ${{ github.ref == 'refs/heads/master' && '' || format('{0}-', github.head_ref || github.ref_name) }}
steps:
- 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: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push client image
uses: docker/build-push-action@v6
with:
push: true
load: false
# Disabled until elifesciences/php or another image with ARM support can be used as a base
# platforms: linux/amd64,linux/arm64
target: prod
tags: |

Check failure on line 68 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yaml (Line: 68, Col: 17): An expression was expected
${{ env.IMAGE_REPO }}:${{ github.sha }}
${{ env.IMAGE_REPO }}:${{}}${{ needs.generate-version.outputs.trunkver }}