diff --git a/.github/workflows/target.yml b/.github/workflows/target.yml new file mode 100644 index 0000000000..e07950254c --- /dev/null +++ b/.github/workflows/target.yml @@ -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 }} diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 0fd24fd16e..6fdfbf0fa7 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,4 +1,4 @@ -name: Target & Verify +name: Verify # === Triggers === 'on': @@ -6,20 +6,16 @@ name: Target & Verify 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 }} @@ -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 }}