Skip to content

Commit

Permalink
Merge pull request #194 from hathitrust/action-updates
Browse files Browse the repository at this point in the history
Action updates
  • Loading branch information
Ronster2018 authored Apr 8, 2024
2 parents 6e187f6 + 51b1680 commit d6af065
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 109 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/build-master.yml

This file was deleted.

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 }}
20 changes: 0 additions & 20 deletions .github/workflows/deploy-test.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/deploy.yml

This file was deleted.

24 changes: 6 additions & 18 deletions .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
---
name: Docker Tag Latest Release

on:
release:
types: [released]

jobs:
build:
tag-release:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
- uses: hathitrust/github_actions/tag-release@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Clone latest repository
uses: actions/checkout@v2
- name: Tag latest release in GHCR
run: |
docker pull ghcr.io/hathitrust/dex-shib-proxy-unstable:${{ github.sha }}
docker tag ghcr.io/hathitrust/dex-shib-proxy-unstable:${{ github.sha }} ghcr.io/hathitrust/dex-shib-proxy:${{ github.event.release.tag_name }}
docker tag ghcr.io/hathitrust/dex-shib-proxy-unstable:${{ github.sha }} ghcr.io/hathitrust/dex-shib-proxy:latest
docker push ghcr.io/hathitrust/dex-shib-proxy:${{ github.event.release.tag_name }}
docker push ghcr.io/hathitrust/dex-shib-proxy:latest
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 }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml → .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

0 comments on commit d6af065

Please sign in to comment.