-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow for text extraction taskrunner
- Loading branch information
Showing
1 changed file
with
108 additions
and
0 deletions.
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
.github/workflows/publish-text-extraction-taskrunner.yml
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,108 @@ | ||
--- | ||
# Automatically build and publish the text-extraction-taskrunner to the container registry. | ||
# This workflow is triggered on changes to the text-extraction-taskrunner directory. | ||
|
||
name: Build and Publish text-extraction-taskrunner | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
paths: | ||
- 'packages/taskrunner/**' | ||
- 'packages/text_extraction/**' | ||
branches: | ||
- 'main' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
image-tag: | ||
name: Get tagged image name | ||
uses: ./.github/workflows/image-tag.yml | ||
with: | ||
image-name: ghcr.io/darpa-askem/text-extraction-taskrunner | ||
|
||
amd64: | ||
runs-on: ubuntu-24.04 | ||
needs: image-tag | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate GradleW JAR | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Setup Java v17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: gradle | ||
|
||
- name: Create image and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./packages/text_extraction/Dockerfile | ||
platforms: linux/amd64 | ||
push: true | ||
tags: ${{ needs.image-tag.outputs.tagged-image-name }}--amd64 | ||
|
||
arm64-emulation: | ||
runs-on: ubuntu-24.04 | ||
needs: image-tag | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Validate GradleW JAR | ||
uses: gradle/actions/wrapper-validation@v3 | ||
|
||
- name: Setup Java v17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: 17 | ||
cache: gradle | ||
|
||
- name: Create image and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./packages/text_extraction/Dockerfile | ||
platforms: linux/arm64 | ||
push: true | ||
tags: ${{ needs.image-tag.outputs.tagged-image-name }}--arm64 | ||
|
||
merge-images: | ||
name: Merge AMD64 and ARM64 images under one manifest | ||
needs: | ||
- image-tag | ||
- amd64 | ||
- arm64-emulation | ||
uses: ./.github/workflows/merge-images.yml | ||
with: | ||
name: ${{ needs.image-tag.outputs.tagged-image-name }} |