Skip to content

Commit

Permalink
Regen (#11022)
Browse files Browse the repository at this point in the history
* Updating

* updating
  • Loading branch information
woody-apple authored and pull[bot] committed Dec 9, 2021
1 parent ef0ad52 commit 1467820
Showing 1 changed file with 44 additions and 26 deletions.
70 changes: 44 additions & 26 deletions .github/workflows/zap_regeneration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,58 @@ name: ZAP - Regenerate

on:
workflow_dispatch:
issue_comment:
types: [created]

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true

jobs:
zap_regenerate:
name: ZAP - Regenerate
zap_regeneration:
name: ZAP Regeneration
timeout-minutes: 60

runs-on: ubuntu-18.04
if: (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/regenerate')) || (github.event_name == 'workflow_dispatch')
if: github.actor != 'restyled-io[bot]'

steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Use Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
java-package: jre
- run: sudo apt-get update
- run: sudo apt-get install -fy --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev python-autopep8
- name: Rebase and regenerate
run: scripts/helpers/rebase_and_regenerate_zap.sh
env:
GITHUB_TOKEN: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Use Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
java-package: jre
- run: sudo apt-get update
- run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev python-autopep8
- name: Setup ZAP
timeout-minutes: 5
run: |
cd third_party/zap/repo/
npm ci
npm run version-stamp
npm rebuild canvas --update-binary
npm run build-spa
- name: Generate all
timeout-minutes: 5
run: scripts/tools/zap_regen_all.py
- name: Add uncommitted changes
run: git add .
- name: Fix upstream
run: |
git remote set-url origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
git config --global user.email "$USER_EMAIL"
git config --global user.name "$USER_NAME"
env:
COMMITTER_TOKEN: ${{ secrets.MATTER_PAT }}
USER_EMAIL: ${{ secrets.MATTER_PAT_EMAIL }}
USER_NAME: ${{ secrets.MATTER_PAT_NAME }}
GITHUB_REPOSITORY: ${{ github.GITHUB_REPOSITORY }}
- name: Push
run: git push

0 comments on commit 1467820

Please sign in to comment.