From ddf78990e2a5810bbb2fbd916280601938aaf9ae Mon Sep 17 00:00:00 2001 From: reid Date: Wed, 23 Oct 2024 10:21:08 -0500 Subject: [PATCH] fix gh token var --- .github/workflows/build-ylem-container-prod-env.yaml | 6 ++++-- .github/workflows/build-ylem-container-test-env.yaml | 8 +++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-ylem-container-prod-env.yaml b/.github/workflows/build-ylem-container-prod-env.yaml index 9e7b850..575bee5 100644 --- a/.github/workflows/build-ylem-container-prod-env.yaml +++ b/.github/workflows/build-ylem-container-prod-env.yaml @@ -12,10 +12,12 @@ jobs: steps: - name: Send repository dispatch to ylem (prod) uses: actions/github-script@v6 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: script: | - const { GH_TOKEN } = process.env; - await github.repos.createDispatchEvent({ + const { GITHUB_TOKEN } = process.env; + await github.rest.actions.createDispatchEvent({ owner: 'tloncorp', repo: 'ylem', event_type: 'prod-breach-ship-docker', diff --git a/.github/workflows/build-ylem-container-test-env.yaml b/.github/workflows/build-ylem-container-test-env.yaml index 6bc6ef7..9fd4c06 100644 --- a/.github/workflows/build-ylem-container-test-env.yaml +++ b/.github/workflows/build-ylem-container-test-env.yaml @@ -1,4 +1,4 @@ -name: Trigger internal azimuth-cli prod build +name: Trigger internal azimuth-cli test build on: workflow_dispatch: @@ -9,10 +9,12 @@ jobs: steps: - name: Send repository dispatch to ylem (test) uses: actions/github-script@v6 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: script: | - const { GH_TOKEN } = process.env; - await github.repos.createDispatchEvent({ + const { GITHUB_TOKEN } = process.env; + await github.rest.actions.createDispatchEvent({ owner: 'tloncorp', repo: 'ylem', event_type: 'test-breach-ship-docker',