Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 5654d2f

Browse files
authored
sync: update CI config files (#124)
1 parent 4796241 commit 5654d2f

File tree

2 files changed

+7
-49
lines changed

2 files changed

+7
-49
lines changed

.github/workflows/automerge.yml

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,11 @@
11
# File managed by web3-bot. DO NOT EDIT.
22
# See https://github.com/protocol/.github/ for details.
33

4-
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
5-
# This reduces the friction associated with updating with our workflows.
6-
7-
on: [ pull_request ]
84
name: Automerge
5+
on: [ pull_request ]
96

107
jobs:
11-
automerge-check:
12-
if: github.event.pull_request.user.login == 'web3-bot'
13-
runs-on: ubuntu-latest
14-
outputs:
15-
status: ${{ steps.should-automerge.outputs.status }}
16-
steps:
17-
- uses: actions/checkout@v2
18-
with:
19-
fetch-depth: 0
20-
- name: Check if we should automerge
21-
id: should-automerge
22-
run: |
23-
for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do
24-
committer=$(git show --format=$'%ce' -s $commit)
25-
echo "Committer: $committer"
26-
if [[ "$committer" != "[email protected]" ]]; then
27-
echo "Commit $commit wasn't committed by web3-bot, but by $committer."
28-
echo "::set-output name=status::false"
29-
exit
30-
fi
31-
done
32-
echo "::set-output name=status::true"
338
automerge:
34-
needs: automerge-check
35-
runs-on: ubuntu-latest
36-
# The check for the user is redundant here, as this job depends on the automerge-check job,
37-
# but it prevents this job from spinning up, just to be skipped shortly after.
38-
if: github.event.pull_request.user.login == 'web3-bot' && needs.automerge-check.outputs.status == 'true'
39-
steps:
40-
- name: Wait on tests
41-
uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
42-
with:
43-
ref: ${{ github.event.pull_request.head.sha }}
44-
repo-token: ${{ secrets.GITHUB_TOKEN }}
45-
wait-interval: 10
46-
running-workflow-name: 'automerge' # the name of this job
47-
- name: Merge PR
48-
uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
49-
env:
50-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
51-
MERGE_LABELS: ""
52-
MERGE_METHOD: "squash"
53-
MERGE_DELETE_BRANCH: true
9+
uses: protocol/.github/.github/workflows/automerge.yml@master
10+
with:
11+
job: 'automerge'

.github/workflows/js-test-and-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ name: test & maybe release
55
on:
66
push:
77
branches:
8-
- $default-branch # with #262 - ${{{ github.default_branch }}}
8+
- master # with #262 - ${{{ github.default_branch }}}
99
pull_request:
1010
branches:
11-
- $default-branch # with #262 - ${{{ github.default_branch }}}
11+
- master # with #262 - ${{{ github.default_branch }}}
1212

1313
jobs:
1414

@@ -136,7 +136,7 @@ jobs:
136136
release:
137137
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
138138
runs-on: ubuntu-latest
139-
if: github.event_name == 'push' && github.ref == 'refs/heads/$default-branch' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
139+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
140140
steps:
141141
- uses: actions/checkout@v2
142142
with:

0 commit comments

Comments
 (0)