Skip to content

Commit

Permalink
[feat] craft consolidated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBoWu committed Jan 11, 2024
1 parent 85c4de8 commit c1539e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ jobs:

steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@b4ffde6 # v4.1.1
with:
ref: ${{ inputs.sha }}

- uses: pnpm/action-setup@v2.0.1
- uses: pnpm/action-setup@d882d12 # v2.4.0
with:
version: 8.8.0

- name: Setup Node.js environment
uses: actions/setup-node@v3
uses: actions/setup-node@b39b52d # v4.0.1
with:
node-version: 20.0.0
cache: pnpm
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/external-pr.yaml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
name: External PR
name: CI workflow

on:
pull_request_target:
types: [opened, synchronize]

jobs:
authorize:
if: github.event.pull_request.head.repo.full_name != github.repository
environment: 'external'
environment:
${{ github.event_name == 'pull_request_target' &&
github.event.pull_request.head.repo.full_name != github.repository &&
'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true

build_and_test:
needs: authorize
uses: ./.github/workflows/build-and-test.yaml
with:
sha: ${{ github.event.pull_request.head.sha }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}
ENVIRONMENT: 'alpha-sepolia'
secrets:
API_BASE_URL: ${{ secrets.API_BASE_URL }}
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/internal-pr.yaml

This file was deleted.

0 comments on commit c1539e3

Please sign in to comment.