Skip to content

Manual Trigger Build & Deploy Unstable #32

Manual Trigger Build & Deploy Unstable

Manual Trigger Build & Deploy Unstable #32

name: Manual Trigger Build & Deploy Unstable
on:
workflow_run:
workflows: ['Run Tests']
branches: ['main']
types: [completed]
workflow_dispatch:
inputs:
img_tag:
description: Docker Image Tag
ref:
description: Revision or Branch to build
default: main
push_latest:
description: Set True if the build is for the latest version
type: boolean
required: false
default: false
platforms:
description: Platforms to build for
type: choice
default: linux/amd64,linux/arm64
options:
- linux/amd64,linux/arm64
- linux/amd64
- linux/arm64
rebuild:
description: Rebuild this image?
type: boolean
default: false
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
outputs:
ghc_img: ${{ steps.image.outputs.ghc_img }}
steps:
- name: Build Image
uses: hathitrust/github_actions/build@v1
id: image
with:
image: ghcr.io/${{ github.repository }}
dockerfile: Dockerfile
img_tag: ${{ inputs.img_tag }}
tag: ${{ inputs.ref }}
push_latest: ${{ inputs.push_latest}}
registry_token: ${{ github.token }}
rebuild: ${{ inputs.rebuild }}
deploy-unstable:
needs: build-image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Deploy to workshop
uses: hathitrust/github_actions/deploy@v1
with:
image: ${{ needs.build-image.outputs.ghc_img }}
file: environments/${{ github.event.repository.name }}/testing/web-image.txt
CONFIG_REPO_RW_APP_ID: ${{ vars.CONFIG_REPO_RW_APP_ID }}
CONFIG_REPO_FULL_NAME: ${{ vars.CONFIG_REPO_FULL_NAME }}
CONFIG_REPO_RW_KEY: ${{secrets.CONFIG_REPO_RW_KEY}}