Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Use our own github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aelkiss committed Apr 24, 2024
1 parent 1f1d6e2 commit b554c04
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 15 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build A Branch

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

workflow_dispatch:
inputs:
img_tag:
description: Docker Image Tag
ref:
description: Revision or Branch to build
default: master
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.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 }}
16 changes: 16 additions & 0 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Docker Tag Latest Release

on:
release:
types: [released]

jobs:
tag-release:
runs-on: ubuntu-latest
steps:
- uses: hathitrust/github_actions/tag-release@v1
with:
registry_token: ${{ github.token }}
existing_tag: ghcr.io/${{ github.repository }}-unstable:${{ github.sha }}
image: ghcr.io/${{ github.repository }}
new_tag: ${{ github.event.release.tag_name }}
16 changes: 1 addition & 15 deletions .github/workflows/ci.yaml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Run Tests

on:
push:
Expand Down Expand Up @@ -150,20 +150,6 @@ jobs:
- name: Lint
run: make lint

artifacts:
name: Artifacts
uses: ./.github/workflows/artifacts.yaml
with:
publish: ${{ github.event_name == 'push' }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
permissions:
contents: read
packages: write
id-token: write
security-events: write

dependency-review:
name: Dependency review
runs-on: ubuntu-latest
Expand Down

0 comments on commit b554c04

Please sign in to comment.