diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index af79498..88b84e8 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -6,6 +6,7 @@ on: - main - release-* pull_request: + workflow_dispatch: release: types: - created diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml index 3f2be72..f71a4d2 100644 --- a/.github/workflows/update-version.yml +++ b/.github/workflows/update-version.yml @@ -21,6 +21,10 @@ on: jobs: update-version: runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + actions: write steps: - name: Checkout code uses: actions/checkout@v7.0.1 @@ -102,6 +106,7 @@ jobs: rm -f current_version.txt - name: Create Pull Request + id: cpr uses: peter-evans/create-pull-request@v8.1.1 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -114,3 +119,9 @@ jobs: Auto-generated by GitHub Actions. draft: false delete-branch: true + + - name: Run tests on the pull request + if: steps.cpr.outputs.pull-request-operation == 'created' || steps.cpr.outputs.pull-request-operation == 'updated' + env: + GH_TOKEN: ${{ github.token }} + run: gh workflow run test-deploy.yml --repo "$GITHUB_REPOSITORY" --ref "${{ steps.cpr.outputs.pull-request-branch }}"