Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
8f89da69
Commit
8f89da69
authored
Aug 10, 2021
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update workflows
parent
9f13e9ce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
19 deletions
+42
-19
merge-upstream.yml
.github/workflows/merge-upstream.yml
+11
-8
transpile.yml
.github/workflows/transpile.yml
+11
-8
merge-upstream.sh
scripts/upgradeable/merge-upstream.sh
+20
-3
No files found.
.github/workflows/merge-upstream.yml
View file @
8f89da69
...
@@ -2,21 +2,24 @@ name: Merge upstream
...
@@ -2,21 +2,24 @@ name: Merge upstream
on
:
on
:
workflow_dispatch
:
{}
workflow_dispatch
:
{}
schedule
:
repository_dispatch
:
-
cron
:
'
0
10
*
*
*'
types
:
[
update
]
# client_payload: { ref: string }
concurrency
:
group
:
merge-${{ github.event.client_payload.ref || github.ref }}
cancel-in-progress
:
true
jobs
:
jobs
:
updat
e
:
merg
e
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
uses
:
rokroskar/workflow-run-cleanup-action@v0.2.2
env
:
GITHUB_TOKEN
:
${{github.token}}
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
with
:
with
:
ref
:
upstream-patched
fetch-depth
:
0
fetch-depth
:
0
ssh-key
:
${{
secrets.DEPLOY_KEY
}}
ssh-key
:
${{
secrets.DEPLOY_KEY
}}
-
run
:
bash scripts/upgradeable/git-user-config.sh
-
run
:
bash scripts/upgradeable/git-user-config.sh
-
run
:
bash scripts/upgradeable/merge-upstream.sh
-
run
:
bash scripts/upgradeable/merge-upstream.sh
env
:
REF
:
${{ github.event.client_payload.ref || github.ref}}
-
run
:
git push
-
run
:
git push
.github/workflows/transpile.yml
View file @
8f89da69
...
@@ -3,20 +3,23 @@ name: Transpile
...
@@ -3,20 +3,23 @@ name: Transpile
on
:
on
:
workflow_dispatch
:
{}
workflow_dispatch
:
{}
push
:
push
:
branches
:
[
upstream-patched
]
branches
:
[
patched/*
]
concurrency
:
group
:
transpile
cancel-in-progress
:
true
jobs
:
jobs
:
transpile
:
transpile
:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
if
:
startsWith(github.ref, 'refs/heads/patched/')
steps
:
steps
:
-
uses
:
rokroskar/workflow-run-cleanup-action@v0.2.2
-
run
:
echo ::set-output name="${GITHUB_REF#refs/heads/patched/}"
env
:
id
:
branch
GITHUB_TOKEN
:
${{github.token}}
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
with
:
with
:
ref
:
upstream-patched
fetch-depth
:
0
fetch-depth
:
0
ssh-key
:
${{
secrets.DEPLOY_KEY
}}
ssh-key
:
${{
secrets.DEPLOY_KEY
}}
-
uses
:
actions/setup-node@v1
-
uses
:
actions/setup-node@v1
with
:
with
:
node-version
:
12.x
node-version
:
12.x
...
@@ -29,5 +32,5 @@ jobs:
...
@@ -29,5 +32,5 @@ jobs:
-
run
:
npm ci
-
run
:
npm ci
if
:
steps.cache.outputs.cache-hit != 'true'
if
:
steps.cache.outputs.cache-hit != 'true'
-
run
:
bash scripts/upgradeable/git-user-config.sh
-
run
:
bash scripts/upgradeable/git-user-config.sh
-
run
:
bash scripts/upgradeable/transpile-onto.sh
master origin/master
-
run
:
bash scripts/upgradeable/transpile-onto.sh
${{ steps.branch.outputs.name }} origin/${{ steps.branch.outputs.name }}
-
run
:
git push origin
master
-
run
:
git push origin
${{ steps.branch.outputs.name }}
scripts/upgradeable/merge-upstream.sh
View file @
8f89da69
#!/usr/bin/env bash
#!/usr/bin/env bash
set
-euo
pipefail
-x
set
-euo
pipefail
git fetch
'https://github.com/OpenZeppelin/openzeppelin-contracts.git'
:
"
${
REF
:
=
"
$(
git rev-parse
--symbolic-full-name
HEAD
)
"
}
"
git merge FETCH_HEAD
-m
'Merge upstream openzeppelin-contracts into upstream-patched'
if
[[
"
$REF
"
!=
refs/heads/
*
]]
;
then
echo
"
$REF
is not a branch"
>
&2
exit
1
elif
[[
"
$REF
"
==
refs/heads/patches
]]
;
then
echo
"Run on a different branch"
>
&2
exit
1
fi
set
-x
input
=
"
${
REF
#refs/heads/
}
"
upstream
=
"
${
input
#patched/
}
"
branch
=
"patched/
$upstream
"
git checkout
"
$branch
"
2>/dev/null
||
git checkout
-b
"
$branch
"
patches
git fetch
'https://github.com/OpenZeppelin/openzeppelin-contracts.git'
"
$upstream
"
git merge patches FETCH_HEAD
-m
"Merge upstream
$upstream
into
$branch
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment