diff --git a/.github/workflows/argus-docker-build.yaml b/.github/workflows/argus-docker-build.yaml index 210fa59a..75d09499 100644 --- a/.github/workflows/argus-docker-build.yaml +++ b/.github/workflows/argus-docker-build.yaml @@ -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 }} @@ -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 != '[]' @@ -77,20 +85,19 @@ jobs: id: generate_token uses: chanzuckerberg/github-app-token@v1.1.4 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/docker-build-push@docker-build-push-v1.6.0 with: @@ -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 != '[]' @@ -119,8 +126,8 @@ jobs: id: generate_token uses: chanzuckerberg/github-app-token@v1.1.4 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