Skip to content

Commit

Permalink
refactor: Update containers.yaml naming
Browse files Browse the repository at this point in the history
  • Loading branch information
JossWhittle authored Jul 18, 2024
1 parent ef52787 commit 59870bd
Showing 1 changed file with 23 additions and 45 deletions.
68 changes: 23 additions & 45 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,15 @@ on:
# Only consider PRs that change files for this asset, including ci scripts
paths:
- '.github/workflows/containers.yaml'
- 'src/Data-Egress-API/**'
- 'src/Data-Egress-UI/**'
- 'src/DARE-API/**'
- 'src/DARE-FrontEnd/**'
- 'src/TRE-API/**'
- 'src/Tre-Hasura/**'
- 'src/Tre-SQL-PG/**'
- 'src/Tre-SQL-Trino/**'
- 'src/TRE-UI/**'
- 'src/BL/**'
# Make sure all workflows that are "required checks" for a given
# branch protection rule have the same paths: and branches-ignore:
# filters. Otherwise, you can end up in a deadlock waiting on a
# required check that will never be executed.
- 'src/**'
push:
# Only release off of release and maintenance branches for this asset
branches:
- 'main'
# Only consider pushes that change files for this asset, including ci scripts
paths:
- '.github/workflows/containers.yaml'
- 'src/Data-Egress-API/**'
- 'src/Data-Egress-UI/**'
- 'src/DARE-API/**'
- 'src/DARE-FrontEnd/**'
- 'src/TRE-API/**'
- 'src/Tre-Hasura/**'
- 'src/Tre-SQL-PG/**'
- 'src/Tre-SQL-Trino/**'
- 'src/TRE-UI/**'
- 'src/BL/**'
- 'src/**'
permissions:
contents: write
pull-requests: write
Expand All @@ -50,21 +28,21 @@ concurrency:
jobs:
# Job name must be unique across repo to target
# branch protection rules "required checks" properly!
setup-containers:
build-containers:
uses: SwanseaUniversityMedical/workflows/.github/workflows/pr-and-release-repo.yaml@v1.0.0-repo
with:
job-name: setup-containers
job-name: build-containers
release-tag-format: 'v${version}-containers'

egress-api-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: egress-api-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-egress-api
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/Data-Egress-API/Dockerfile
build-context: src
Expand All @@ -74,14 +52,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

egress-ui-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: egress-ui-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-egress-ui
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/Data-Egress-UI/Dockerfile
build-context: src
Expand All @@ -91,14 +69,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

main-api-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: main-api-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-main-api
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/DARE-API/Dockerfile
build-context: src
Expand All @@ -108,14 +86,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

main-ui-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: main-ui-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-main-ui
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/DARE-FrontEnd/Dockerfile
build-context: src
Expand All @@ -125,14 +103,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

tre-api-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: tre-api-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-tre-api
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/TRE-API/Dockerfile
build-context: src
Expand All @@ -142,14 +120,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

tre-hasura-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: tre-hasura-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-tre-hasura
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/Tre-Hasura/Dockerfile
build-context: src
Expand All @@ -159,14 +137,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

tre-sql-pg-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: tre-sql-pg-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-tre-sqlpg
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/Tre-SQL-PG/Dockerfile
build-context: src
Expand All @@ -176,14 +154,14 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

tre-sql-trino-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: tre-sql-trino-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-tre-sqltrino
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/Tre-SQL-Trino/Dockerfile
build-context: src/Tre-SQL-Trino
Expand All @@ -193,18 +171,18 @@ jobs:
registry-token: ${{ secrets.HARBOR_TOKEN }}

tre-ui-container:
needs: setup-containers
needs: build-containers
uses: SwanseaUniversityMedical/workflows/.github/workflows/bulk-pr-and-release-container.yaml@v1.0.0-bulk-containers
with:
job-name: tre-ui-container
registry: ${{ vars.HARBOR_REGISTRY }}
registry-user: ${{ vars.HARBOR_USER }}
registry-repo: ${{ vars.HARBOR_PROJECT }}/${{ vars.HARBOR_REPO }}-tre-ui
release-info: ${{ needs.setup-containers.outputs.release-info }}
release-info: ${{ needs.build-containers.outputs.release-info }}
cosign-public-key: ${{ vars.COSIGN_PUBLIC_KEY }}
build-file: src/TRE-UI/Dockerfile
build-context: src
secrets:
cosign-private-key: ${{ secrets.COSIGN_PRIVATE_KEY }}
cosign-password: ${{ secrets.COSIGN_PASSWORD }}
registry-token: ${{ secrets.HARBOR_TOKEN }}
registry-token: ${{ secrets.HARBOR_TOKEN }}

0 comments on commit 59870bd

Please sign in to comment.