forked from cdlib/presign_prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hathitrust/DEV-1324
Added basic individual test, build, and deploy workflows.
- Loading branch information
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build | ||
|
||
on: | ||
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 | ||
|
||
steps: | ||
- name: Build Image | ||
uses: hathitrust/github_actions/[email protected] | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch_hash: | ||
description: Revision or Branch to build | ||
default: main | ||
environments: | ||
description: The environment to deploy to | ||
type: choice | ||
default: linux/amd64,linux/arm64 | ||
options: | ||
- testing | ||
- staging | ||
- production | ||
|
||
jobs: | ||
deploy-unstable: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Deploy to workshop | ||
uses: hathitrust/github_actions/deploy@DEV-1150 | ||
with: | ||
image: ghcr.io/${{ github.repository }}${{ inputs.branch_hash }} | ||
file: environments/${{ github.event.repository.name }}/${{inputs.environments}}/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}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Run Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Simple Test | ||
run: echo "Testing!" |