This repository has been archived by the owner on Dec 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (43 loc) · 1.53 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: Build
on:
pull_request: {}
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
env:
CI: "true"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Install dependencies
run: yarn install --check-files --frozen-lockfile
- name: Set git identity
run: |-
git config user.name "Automation"
git config user.email "[email protected]"
- name: Build
run: npx projen build
- name: Check for changes
id: git_diff
run: git diff --exit-code || echo "::set-output name=has_changes::true"
- if: steps.git_diff.outputs.has_changes
name: Commit and push changes (if changed)
run: 'git add . && git commit -m "chore: self mutation" && git push origin
HEAD:${{ github.event.pull_request.head.ref }}'
- if: steps.git_diff.outputs.has_changes
name: Update status check (if changed)
run: gh api -X POST /repos/${{ github.event.pull_request.head.repo.full_name
}}/check-runs -F name="build" -F head_sha="$(git rev-parse HEAD)" -F
status="completed" -F conclusion="success"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
container:
image: jsii/superchain