Skip to content

Refactor PointEntryCreator component and add tour #23

Refactor PointEntryCreator component and add tour

Refactor PointEntryCreator component and add tour #23

Workflow file for this run

#
name: Docker build
on:
push:
# Release is a special branch that is kept in sync with the production environment
# We also want to keep the dev environment in sync with the main branch
branches: ['release', 'main']
env:
REGISTRY: ghcr.io
PORTAL_IMAGE_NAME: ukdanceblue/app-portal
SERVER_IMAGE_NAME: ukdanceblue/app-server
jobs:
build-and-push-portal-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up node 18.x
uses: actions/[email protected]
with:
node-version: 18
cache: yarn
- name: Install dependencies
working-directory: ./packages/portal
run: yarn install
- name: Build GraphQL
run: yarn run gql:build
working-directory: .
- name: Build common
run: yarn run build
working-directory: ./packages/common
- name: Build portal
run: yarn run build
working-directory: ./packages/portal
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@f3c3cad8ad5e1076ffba2449385b1547f1e3c566
with:
images: ${{ env.REGISTRY }}/${{ env.PORTAL_IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: ./packages/portal
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-server-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up node 18.x
uses: actions/[email protected]
with:
node-version: 18
cache: yarn
- name: Install dependencies
working-directory: ./packages/server
run: yarn install
- name: Build common
run: yarn run build
working-directory: ./packages/common
- name: Build server
run: yarn run build
working-directory: ./packages/server
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
- name: Log in to the Container registry
uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@f3c3cad8ad5e1076ffba2449385b1547f1e3c566
with:
images: ${{ env.REGISTRY }}/${{ env.SERVER_IMAGE_NAME }}
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
- name: Build and push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: .
file: ./packages/server/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
trigger-recreate-release:
runs-on: ubuntu-latest
needs: [build-and-push-portal-image, build-and-push-server-image]
if: github.ref == 'refs/heads/release'
steps:
- name: Trigger container recreate
shell: bash
run: |
curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_PORTAL_RECREATE_WEBHOOK }} && curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_SERVER_RECREATE_WEBHOOK }}
trigger-recreate-main:
runs-on: ubuntu-latest
needs: [build-and-push-portal-image, build-and-push-server-image]
if: github.ref == 'refs/heads/main'
steps:
- name: Trigger container recreate
shell: bash
run: |
curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_DEV_PORTAL_RECREATE_WEBHOOK }} && curl --insecure -X POST ${{ secrets.DANCEBLUE_APP_DEV_SERVER_RECREATE_WEBHOOK }}