From 31269d9a5cbd6f02cda3cf25b63bbcd31c9f18bc Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 30 Nov 2023 18:01:48 -0500 Subject: [PATCH] Split up target and verify GitHub Actions. --- .github/workflows/target.yml | 47 ++++++++++++++++++++++++++++++++++++ .github/workflows/verify.yml | 31 +++--------------------- 2 files changed, 51 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/target.yml diff --git a/.github/workflows/target.yml b/.github/workflows/target.yml new file mode 100644 index 0000000000..2bae871afe --- /dev/null +++ b/.github/workflows/target.yml @@ -0,0 +1,47 @@ +name: Target + +# === Triggers === +'on': + pull_request: + types: + - opened + +# === JOBS === +jobs: + # === Target PR === + targetpr: + name: Target PR + runs-on: ubuntu-20.04 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }} + JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} + concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + timeout-minutes: 5 + + steps: + - # === Checkout code === + name: Checkout code + uses: actions/checkout@v2 + + - # === Install Go === + name: Install Go + uses: actions/setup-go@v3 + with: + go-version: '1.20.x' + + - # === Install State Tool === + name: Install State Tool + uses: ActiveState/setup-state-tool@v1 + + - # === Preprocess === + name: Preprocess + shell: bash + run: state run preprocess -v + + - # === Set Target PR & FixVersion === + name: Set Target PR and FixVersion + shell: bash + run: go run scripts/ci/target-version-pr/main.go ${{ github.event.pull_request.number }} diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 0fd24fd16e..e25ccdcd55 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,4 +1,4 @@ -name: Target & Verify +name: Verify # === Triggers === 'on': @@ -12,14 +12,11 @@ name: Target & Verify # === JOBS === jobs: - # === Target & Verify PR === + # === Verify PR === verifypr: - name: Target & Verify PR + name: Verify PR runs-on: ubuntu-20.04 env: - ACTIVESTATE_CI: true - ACTIVESTATE_CLI_DISABLE_RUNTIME: true - SHELL: bash GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} JIRA_USERNAME: ${{ secrets.JIRA_EMAIL }} JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }} @@ -43,32 +40,12 @@ jobs: name: Install State Tool uses: ActiveState/setup-state-tool@v1 - - # === Setup === - name: Setup - shell: bash - run: | - bin=$(pwd)/.github/deps/${{ runner.os }}/bin - echo "Adding $bin to PATH" - echo "$bin" >> $GITHUB_PATH - ls -ahl $bin - printenv - - - # === Install Deps === - name: Install Deps - shell: bash - run: state run install-deps - - # === Preprocess === name: Preprocess shell: bash run: state run preprocess -v - - # === Set Target PR & FixVersion === - name: Set Target PR and FixVersion - shell: bash - run: go run scripts/ci/target-version-pr/main.go ${{ github.event.pull_request.number }} - - - # === Actually Verify PR === + - # === Verify PR === name: Verify PR shell: bash run: go run scripts/ci/verify-pr/main.go ${{ github.event.pull_request.number }}