Commit 3d2feb03 by Francisco Giordano

Transpile ba1ef2d3

parent 06f996b2
...@@ -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:
update: merge:
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
...@@ -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 }}
#!/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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment