Skip to content

chore(deps): update ghcr.io/elifesciences/enhanced-preprints-import-w… #10310

chore(deps): update ghcr.io/elifesciences/enhanced-preprints-import-w…

chore(deps): update ghcr.io/elifesciences/enhanced-preprints-import-w… #10310

Workflow file for this run

name: CI Pipeline
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
push:
branches:
- master
tags:
- '*'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version: "${{ steps.nvm.outputs.NVMRC }}"
cache: yarn
- name: yarn install
run: yarn
- name: Lint
run: yarn lint
- name: install browsers
run: yarn playwright install chromium
- name: Pull images
run: docker compose pull --quiet
- name: Bring up EPP
run: docker compose up --wait
- name: Docker compose status
if: failure()
run: |
docker compose ps
echo "Docker logs for minio"
echo ""
docker compose logs minio
echo ""
echo "Docker logs for createbucket"
echo ""
docker compose logs createbucket
echo ""
echo "Docker logs for loadbucket"
echo ""
docker compose logs loadbucket
echo ""
echo "Docker logs for temporal"
echo ""
docker compose logs temporal
echo ""
echo "Docker logs for mongodb"
echo ""
docker compose logs mongodb
echo ""
echo "Docker logs for api"
echo ""
docker compose logs api
echo ""
echo "Docker logs for client"
echo ""
docker compose logs client
echo ""
echo "Docker logs for xslt"
echo ""
docker compose logs xslt
echo ""
echo "Docker logs for worker"
echo ""
docker compose logs worker
echo ""
echo "Docker logs for wiremock"
echo ""
docker compose logs wiremock
echo ""
- name: run tests
run: yarn test --workers 5
- name: Playwright report upload
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/index.html
- name: Failure Slack Notification
uses: slackapi/[email protected]
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_E2E_NOTIFICATION_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"text": ":fire: EPP GitHub Action e2e test failure",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":fire: EPP e2e test failure",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.html_url || github.event.head_commit.url }}|View Pull Request>"
}
}
]
}
approve-images:
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/master'
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: Get images from docker-compose
run: |
echo "SERVER_IMAGE_AND_TAG=$(yq '.services.api.image' docker-compose.yaml)" >> $GITHUB_ENV
echo "CLIENT_IMAGE_AND_TAG=$(yq '.services.client.image' docker-compose.yaml)" >> $GITHUB_ENV
echo "IMPORT_IMAGE_AND_TAG=$(yq '.services.worker.image' docker-compose.yaml)" >> $GITHUB_ENV
echo "IMPORT_CONTROLLER_IMAGE_AND_TAG=$(yq '.services.import-controller.image' docker-compose.yaml)" >> $GITHUB_ENV
echo "XSLT_IMAGE_AND_TAG=$(yq '.services.xslt.image' docker-compose.yaml)" >> $GITHUB_ENV
echo "ENCODA_IMAGE_AND_TAG=$(yq '.services.encoda.image' docker-compose.yaml)" >> $GITHUB_ENV
- name: create new manifest for accepted tags
run: |
docker buildx imagetools create -t $CLIENT_IMAGE_AND_TAG-approved $CLIENT_IMAGE_AND_TAG
docker buildx imagetools create -t $SERVER_IMAGE_AND_TAG-approved $SERVER_IMAGE_AND_TAG
docker buildx imagetools create -t $IMPORT_IMAGE_AND_TAG-approved $IMPORT_IMAGE_AND_TAG
docker buildx imagetools create -t $IMPORT_CONTROLLER_IMAGE_AND_TAG-approved $IMPORT_CONTROLLER_IMAGE_AND_TAG
docker buildx imagetools create -t $XSLT_IMAGE_AND_TAG-approved $XSLT_IMAGE_AND_TAG
docker buildx imagetools create -t $ENCODA_IMAGE_AND_TAG-approved $ENCODA_IMAGE_AND_TAG
- name: Success Slack Notification
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_E2E_NOTIFICATION_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"text": ":tada: EPP GitHub Action e2e test success and new images approved",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":tada: EPP GitHub Action e2e test success and new images approved",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Client image:*\n ${{ env.CLIENT_IMAGE_AND_TAG }}"
},
{
"type": "mrkdwn",
"text": "*Server image:*\n ${{ env.SERVER_IMAGE_AND_TAG }}"
},
{
"type": "mrkdwn",
"text": "*import image:*\n ${{ env.IMPORT_IMAGE_AND_TAG }}"
},
{
"type": "mrkdwn",
"text": "*import-controller image:*\n ${{ env.IMPORT_CONTROLLER_IMAGE_AND_TAG }}"
},
{
"type": "mrkdwn",
"text": "*xslt image:*\n ${{ env.XSLT_IMAGE_AND_TAG }}"
},
{
"type": "mrkdwn",
"text": "*encoda image:*\n ${{ env.ENCODA_IMAGE_AND_TAG }}"
}
]
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.html_url || github.event.head_commit.url }}|View Commit>"
}
}
]
}
- name: Failure Slack Notification
uses: slackapi/[email protected]
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_E2E_NOTIFICATION_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"text": ":fire: EPP GitHub Action e2e test success, but new images failed to approved",
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": ":fire: EPP GitHub Action e2e test success, but new images failed to approved",
"emoji": true
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.html_url || github.event.head_commit.url }}|View Commit>"
}
}
]
}