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 01acb0d
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 37 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/target.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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'

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

# === Triggers ===
'on':
pull_request:
types:
- edited
- labeled
- opened
- synchronize
- reopened

# === 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 @@ -39,36 +35,7 @@ jobs:
with:
go-version: '1.20.x'

- # === Install State Tool ===
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 01acb0d

Please sign in to comment.