From aa8ffbc308dab1538e6da5036ca1c6e3895e2386 Mon Sep 17 00:00:00 2001 From: Zack Siri Date: Tue, 20 Feb 2024 14:27:51 +0700 Subject: [PATCH] Fix config --- .github/workflows/deployment.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 0108b6d..255ea03 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -1,21 +1,22 @@ name: 'Deployment' on: - push: - branches: - - main - - master - - develop + workflow_run: + workflows: ["CI"] + branches: [main, develop] + types: + - completed jobs: build: name: Build runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: - name: 'Checkout' uses: actions/checkout@v4 with: - ref: ${{ github.ref }} + ref: ${{ github.event.workflow_run.head_branch }} fetch-depth: 0 - name: Setup Pakman @@ -72,8 +73,8 @@ jobs: run: pakman push shell: alpine.sh {0} env: - WORKFLOW_REF: ${{ github.ref }} - WORKFLOW_SHA: ${{ github.sha }} + WORKFLOW_REF: ${{ github.event.workflow_run.head_branch }} + WORKFLOW_SHA: ${{ github.event.workflow_run.head_sha }} INSTELLAR_ENDPOINT: https://opsmaru.com INSTELLAR_PACKAGE_TOKEN: ${{secrets.INSTELLAR_PACKAGE_TOKEN}} INSTELLAR_AUTH_TOKEN: ${{secrets.INSTELLAR_AUTH_TOKEN}} \ No newline at end of file