Skip to content

Commit

Permalink
replace scratch workflow with build/deploy staging for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
antmoth committed Dec 18, 2023
1 parent 031eff3 commit 659cb5a
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/branch-scratch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,32 @@
name: Scratch

on:
release:
types: [ released ]
workflow_dispatch:
inputs:
tag:
description: tag
description: release
required: true

jobs:
get-short-tag:
id: get-short-tag
runs-on: ubuntu-latest
steps:
- name: save short tag to environment
run: echo "short_tag=$(echo ${{ github.event.inputs.tag }} | head -c 8 )" >> $GITHUB_ENV
- name: echo env var
run: echo "${{ github.env.short_tag }}"
build-staging:
name: Build staging ${{ github.event.inputs.tag }}
uses: mlibrary/platform-engineering-workflows/.github/workflows/build-production.yml@v1
with:
image_name: ${{ vars.IMAGE_NAME }}
tag: ${{ github.event.inputs.tag }}
dockerfile: ./lauth/Dockerfile
secrets: inherit

deploy-staging:
needs: build-staging
name: Deploy to staging
uses: mlibrary/platform-engineering-workflows/.github/workflows/deploy.yml@v1
with:
image: ghcr.io/mlibrary/${{ vars.IMAGE_NAME }}:${{ github.event.inputs.tag }}
file: environments/lauth/staging/web-image.txt
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }}
CONFIG_REPO_RW_INSTALL_ID: ${{ vars.CONFIG_REPO_RW_INSTALL_ID }}
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }}
secrets: inherit

0 comments on commit 659cb5a

Please sign in to comment.