From f53e8d5008eb82c28cdfe1ab5f8f591c18baa6df Mon Sep 17 00:00:00 2001 From: Dylan Jay Date: Tue, 18 Jun 2024 10:42:14 +0700 Subject: [PATCH] use workflow_dispatch --- .github/workflows/dispatch.yaml | 26 ++++++++++++++------------ .github/workflows/test.yaml | 9 --------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/.github/workflows/dispatch.yaml b/.github/workflows/dispatch.yaml index daf8ce1..257d30f 100644 --- a/.github/workflows/dispatch.yaml +++ b/.github/workflows/dispatch.yaml @@ -11,16 +11,18 @@ jobs: runs-on: "ubuntu-latest" steps: - - name: Install dependencies + # - name: Repository Dispatch + # uses: peter-evans/repository-dispatch@v3 + # with: + # token: ${{ secrets.DEPLOY_PAT }} + # repository: pretagov/deploy-helm + # event-type: deploy + - name: Workflow Dispatch run: | - apt-get -y update && apt-get -y install git make - pnpm dlx mrs-developer missdev --no-config --fetch-https \&& pnpm install --frozen-lockfile - - name: Test build - run: | - pnpm run build - - name: Repository Dispatch - uses: peter-evans/repository-dispatch@v3 - with: - token: ${{ secrets.DEPLOY_PAT }} - repository: pretagov/deploy-helm - event-type: deploy \ No newline at end of file + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.DEPLOY_PAT }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://github.com/gitapi/repos/pretagov/deploy-helm/actions/workflows/deploy-to-k8s/dispatches \ + -d '{"ref":"main","inputs":{}}' \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index bb49f20..b2ac9e2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,7 +22,6 @@ jobs: shell: bash run: | echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - uses: actions/cache@v4 name: Setup pnpm cache with: @@ -30,11 +29,6 @@ jobs: key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store- - - # - name: Install dependencies - # run: | - # apt-get -y update && apt-get -y install git make - # pnpm dlx mrs-developer missdev --no-config --fetch-https \&& pnpm install --frozen-lockfile - name: Install dependencies run: | pnpm dlx mrs-developer missdev --no-config --fetch-https @@ -42,6 +36,3 @@ jobs: - name: Check pnpm lockfile consistency run: | pnpm install --lockfile-only - # - name: Test build - # run: | - # pnpm run build