Skip to content

Commit

Permalink
Split up target and verify GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchell-as committed Nov 30, 2023
1 parent ab3f05a commit 741a829
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 27 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Target

# === Triggers ===
'on':
pull_request:
types:
- opened
- reopened

# === 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 }}
31 changes: 4 additions & 27 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Target & Verify
name: Verify

# === Triggers ===
'on':
Expand All @@ -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 }}
Expand All @@ -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 }}

0 comments on commit 741a829

Please sign in to comment.