Skip to content

Commit

Permalink
Merge pull request #7 from hathitrust/action-updates
Browse files Browse the repository at this point in the history
Added standard build template and updated tests.yml checkout version
  • Loading branch information
Ronster2018 authored Mar 19, 2024
2 parents edd423b + 70e652c commit e6efb11
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 18 deletions.
63 changes: 46 additions & 17 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,51 @@
name: Build latest from main and deploy to staging
name: Build

on:
workflow_run:
workflows: [ 'Run Tests']
branches: [ 'main' ]
types: [ completed ]
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:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: hathitrust/github_actions/build@v1
with:
image: ghcr.io/${{ github.repository }}-unstable
tag: ${{ github.sha }}
push_latest: true
registry_token: ${{ github.token }}
steps:
- name: Build Image
uses: hathitrust/github_actions/build@v1.4.0
with:
image: ghcr.io/${{ github.repository }}-unstable
dockerfile: Dockerfile
img_tag: ${{ inputs.img_tag }}
tag: ${{ inputs.ref }}
push_latest: ${{ inputs.push_latest}}
registry_token: ${{ github.token }}
rebuild: ${{ inputs.rebuild }}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up tests
run: |
Expand Down

0 comments on commit e6efb11

Please sign in to comment.