Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from hathitrust/action-updates
Browse files Browse the repository at this point in the history
Updated Tests & Build workflows
  • Loading branch information
Ronster2018 authored Mar 28, 2024
2 parents 87f9c07 + 531c3ef commit 5cd8319
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 53 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/build-main.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/build-manual.yml

This file was deleted.

56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build

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

steps:
- name: Build Image
uses: hathitrust/github_actions/build@v1
with:
image: ghcr.io/${{ github.repository }}-unstable
dockerfile: Dockerfile.prod
img_tag: ${{ inputs.img_tag }}
tag: ${{ inputs.ref }}
push_latest: ${{ inputs.push_latest}}
registry_token: ${{ github.token }}
rebuild: ${{ inputs.rebuild }}


# TODO: automate deployment w/ argocd
# for now - update image in
# https://github.com/hathitrust/ht_tanka/blob/main/environments/search_client/staging/main.jsonnet
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
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: Log in to package registry
uses: docker/login-action@v2
Expand All @@ -24,14 +24,14 @@ jobs:

- name: Set up tests
run: |
docker-compose build
docker-compose run web bundle install
docker compose build
docker compose run web bundle install
- name: Run standardrb
run: docker-compose run test bundle exec standardrb
run: docker compose run test bundle exec standardrb

- name: Run tests
run: docker-compose run test
run: docker compose run test

- name: Report to Coveralls
uses: coverallsapp/[email protected]
Expand Down

0 comments on commit 5cd8319

Please sign in to comment.