Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: hackathon for biohub #265

Closed
wants to merge 8 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 27 additions & 20 deletions .github/workflows/argus-docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,29 @@ on:
workflow_call:
inputs:
envs:
description: The envs that this is building (rdev, staging, or prod), comma delimited
description: |
The env that this is building (rdev, staging, or prod)
required: true
type: string
images:
description: 'JSON array of images to build (required keys: dockerfile, context, name, platform)'
description: |
JSON array of images to build (required keys: dockerfile, context, name, platform)
required: true
type: string
ecr_root_path:
type: string
required: false
default: core-platform-settings
secrets:
app_id:
required: true
pk:
required: true

jobs:
prep:
name: Prep for Build
runs-on: [ARM64,self-hosted,Linux]
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '[no-deploy]') == false
outputs:
image-tag: ${{ steps.build-tags.outputs.IMAGE_TAG }}
Expand Down Expand Up @@ -49,10 +60,7 @@ jobs:
build-docker:
name: Build Docker Image
needs: [prep]
runs-on:
- self-hosted
- Linux
- ${{ matrix.image.platform == 'linux/amd64' && 'X64' || 'ARM64' }}
runs-on: ubuntu-latest
env:
IMAGE_TAG: ${{ needs.prep.outputs.image-tag }}
if: needs.prep.outputs.image-tag != '' && needs.prep.outputs.image-tag != 'sha-' && needs.prep.outputs.images != '[]'
Expand All @@ -77,20 +85,19 @@ jobs:
id: generate_token
uses: chanzuckerberg/[email protected]
with:
app_id: ${{ secrets.CZI_GITHUB_HELPER_APP_ID }}
private_key: ${{ secrets.CZI_GITHUB_HELPER_PK }}
- uses: actions/checkout@v4
with:
repository: chanzuckerberg/core-platform-settings
path: core-platform-settings
token: ${{ steps.generate_token.outputs.token }}

app_id: ${{ secrets.app_id }}
private_key: ${{ secrets.pk }}
# - uses: actions/checkout@v4
# with:
# repository: chanzuckerberg/core-platform-settings
# path: core-platform-settings
# token: ${{ steps.generate_token.outputs.token }}
- name: Create ECR repo if necessary
uses: int128/create-ecr-repository-action@v1
with:
repository: core-platform/${{ github.event.repository.name }}/${{ matrix.image.name }}
lifecycle-policy: core-platform-settings/ecr/lifecycle-policy.json
repository-policy: core-platform-settings/ecr/repository-policy.json
lifecycle-policy: ${{inputs.ecr_root_path}}/lifecycle-policy.json
repository-policy: ${{inputs.ecr_root_path}}/repository-policy.json
- name: Build And Push
uses: chanzuckerberg/github-actions/.github/actions/[email protected]
with:
Expand All @@ -105,7 +112,7 @@ jobs:
update-manifests:
name: Update ArgoCD manifests
needs: [prep, build-docker]
runs-on: [ARM64,self-hosted,Linux]
runs-on: ubuntu-latest
env:
IMAGE_TAG: ${{ needs.prep.outputs.image-tag }}
if: needs.prep.outputs.image-tag != '' && needs.prep.outputs.image-tag != 'sha-' && needs.prep.outputs.images != '[]'
Expand All @@ -119,8 +126,8 @@ jobs:
id: generate_token
uses: chanzuckerberg/[email protected]
with:
app_id: ${{ secrets.CZI_RELEASE_PLEASE_APP_ID }}
private_key: ${{ secrets.CZI_RELEASE_PLEASE_PK }}
app_id: ${{ secrets.app_id }}
private_key: ${{ secrets.pk }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand Down
Loading