Skip to content

Commit

Permalink
Update github actions for holdings-mariadb
Browse files Browse the repository at this point in the history
  • Loading branch information
aelkiss committed Jan 6, 2025
1 parent 5ab328a commit 5ebea16
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 9 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
name: Build

on:
workflow_run:
workflows: ['Run Tests']
branches: ['main']
types: [completed]

workflow_dispatch:
inputs:
img_tag:
Expand Down Expand Up @@ -40,9 +35,9 @@ jobs:

steps:
- name: Build Image
uses: hathitrust/github_actions/build@v1.4.0
uses: hathitrust/github_actions/build@v1
with:
image: ghcr.io/hathitrust/holdings-client-unstable
image: ghcr.io/hathitrust/holdings-mariadb
img_tag: ${{ inputs.img_tag }}
tag: ${{ inputs.ref }}
push_latest: ${{ inputs.push_latest}}
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy

on:
workflow_dispatch:
inputs:
branch_hash:
description: Branch hash (default) or revision to deploy
environments:
description: The environment to deploy to
type: choice
default: testing
options:
- testing

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Deploy to ${{inputs.environments}}
uses: hathitrust/github_actions/deploy@v1
with:
image: ghcr.io/hathitrust/holdings-mariadb:${{ inputs.branch_hash || github.sha}}
file: environments/holdings-mariadb/${{inputs.environments}}/holdings-client-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}}
4 changes: 2 additions & 2 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
- uses: hathitrust/github_actions/tag-release@v1
with:
registry_token: ${{ github.token }}
existing_tag: ghcr.io/hathitrust/holdings-client-unstable:${{ github.sha }}
image: ghcr.io/hathitrust/holdings-client
existing_tag: ghcr.io/hathitrust/holdings-mariadb:${{ github.sha }}
image: ghcr.io/hathitrust/holdings-mariadb
new_tag: ${{ github.event.release.tag_name }}

0 comments on commit 5ebea16

Please sign in to comment.