Skip to content

Merge pull request #224 from bpedersen2/backend-next-compat #8

Merge pull request #224 from bpedersen2/backend-next-compat

Merge pull request #224 from bpedersen2/backend-next-compat #8

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
jobs:
deploy:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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: Create image tags
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
flavor: latest=true # adds :latest tag to outputs.tags
tags: type=sha,format=long,prefix= # adds :<sha> tag to outputs.tags
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
- name: Trigger ESS pipeline
uses: swapActions/trigger-swap-deployment@v1
with:
repository: ${{ github.event.repository.name }}
environment: develop
gh-trigger-url: ${{ secrets.GITLAB_TRIGGER_URL }}
gh-token: ${{ secrets.GITLAB_TRIGGER_TOKEN }}
image-tag: ${{ github.sha }}
- name: Trigger MAXIV pipeline
uses: appleboy/gitlab-ci-action@master
with:
token: ${{ secrets.MAXIV_TOKEN }}
project_id: 22103219
ref: 'master'
host: 'https://gitlab.com'
debug: true