diff --git a/.github/workflows/ship.yml b/.github/workflows/ship.yml index 06b5054..578785a 100644 --- a/.github/workflows/ship.yml +++ b/.github/workflows/ship.yml @@ -4,12 +4,7 @@ concurrency: cancel-in-progress: true on: push: - branches: ["main"] - paths: - - .github/workflows/ship.yml - - "**" - pull_request: - branches: ["main"] + branches: ["main2"] paths: - .github/workflows/ship.yml - "**" @@ -80,9 +75,26 @@ jobs: MULTIPLIER_JWT_SECRET=${{ secrets.MULTIPLIER_JWT_SECRET }} EOF - - uses: ./.github/actions/image-build-push + # - uses: ./.github/actions/image-build-push + # with: + # repository-name: ink-web-app + # dockerfile-path: ./Dockerfile + # docker-context: ./ + # github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate GitHub App Token + id: generate-token + uses: tibdex/github-app-token@v2 with: - repository-name: ink-web-app - dockerfile-path: ./Dockerfile - docker-context: ./ - github-token: ${{ secrets.GITHUB_TOKEN }} + app_id: ${{ secrets.INK_APP_SUBMISSION_BOT_GITHUB_APP_ID }} + private_key: ${{ secrets.INK_APP_SUBMISSION_BOT_GITHUB_PRIVATE_KEY }} + repository: ${{ secrets.TARGET_REPOSITORY }} + + - name: Trigger infra update + if: github.ref == 'refs/heads/main2' + run: | + curl -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: Bearer ${{ steps.generate-token.outputs.token }}" \ + ${{ secrets.TARGET_REPOSITORY_DISPATCH_URL }} \ + -d '{"event_type": "update-eks-image", "client_payload": {"message": "Test commit from GitHub Actions"}}'