Skip to content

Create a simple preview build of journal on GitHub actions when one of two preview-* tags are applied to a PR elifesciences/issues#9051 #1

Create a simple preview build of journal on GitHub actions when one of two preview-* tags are applied to a PR elifesciences/issues#9051

Create a simple preview build of journal on GitHub actions when one of two preview-* tags are applied to a PR elifesciences/issues#9051 #1

Workflow file for this run

name: Pull Request Preview Environment
on:
pull_request:
types: [labeled, unlabeled, synchronize, opened, reopened]
jobs:
build-preview-image:
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels.*.name, 'preview-prod-gateway') || contains(github.event.pull_request.labels.*.name, 'preview-api-dummy') }}
env:
CONTAINER_REPO: ghcr.io/elifesciences/journal
CONTAINER_TAG: preview-${{ github.event.number }}-${{ github.event.pull_request.head.sha }}-${{ steps.date.outputs.date }}

Check failure on line 13 in .github/workflows/previews.yaml

View workflow run for this annotation

GitHub Actions / Pull Request Preview Environment

Invalid workflow file

The workflow is not valid. .github/workflows/previews.yaml (Line: 13, Col: 22): Unrecognized named-value: 'steps'. Located at position 1 within expression: steps.date.outputs.date
steps:
- uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build container image
run: |
docker compose -f 'docker-compose.yml' -f 'docker-compose.ci.yml' build
docker image tag elifesciences/journal:develop ${CONTAINER_REPO}:${CONTAINER_TAG}
- name: Push container image
run: docker push ${CONTAINER_REPO}:${CONTAINER_TAG}