Submit Downstream PRs #111
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Submit Downstream PRs | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
dist: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: "[Setup] Checkout Repository" | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[Setup] Node" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.17.1 | |
- name: "[Setup] Bootstrap Dependencies" | |
run: scripts/bootstrap-dependencies | |
- name: "[Setup] Check Dependencies" | |
run: | | |
node --version | |
yarn list @types/node typescript --depth=0 | |
- name: "[Setup] Git" | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "OneSignal" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[Setup] Build" | |
run: scripts/build | |
- name: "[onesignal-ngx] Checkout" | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
repository: OneSignal/onesignal-ngx | |
fetch-depth: 0 | |
path: __clone/onesignal-ngx | |
- name: "[onesignal-ngx] Patch" | |
run: | | |
tar zxvvf dist/onesignal-ngx.tgz -C __clone/ | |
cd __clone/onesignal-ngx | |
git add -A | |
if git commit -m "Update onesignal-ngx"; then | |
echo "onesignal-ngx repository has been updated" | |
else | |
echo "onesignal-ngx repository has NOT been updated, no changes to commit" | |
fi | |
- name: "[onesignal-ngx] Push" | |
uses: ad-m/[email protected] | |
with: | |
repository: OneSignal/onesignal-ngx | |
directory: __clone/onesignal-ngx | |
force: true | |
branch: cd_update | |
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[onesignal-ngx] Submit PR" | |
uses: octokit/[email protected] | |
continue-on-error: true | |
with: | |
route: POST /repos/{owner}/{repo}/pulls | |
owner: OneSignal | |
repo: onesignal-ngx | |
base: main | |
head: cd_update | |
title: "Generator Update" | |
body: "This update was generated by the GitHub CD action." | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[react-onesignal] Checkout" | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
repository: OneSignal/react-onesignal | |
fetch-depth: 0 | |
submodules: true | |
path: __clone/react | |
- name: "[react-onesignal] Patch" | |
run: | | |
tar zxvvf dist/react.tgz -C __clone/ | |
cd __clone/react | |
git add -A | |
if git commit -m "Update react-onesignal"; then | |
echo "react-onesignal repository has been updated" | |
else | |
echo "react-onesignal repository has NOT been updated, no changes to commit" | |
fi | |
- name: "[react-onesignal] Push" | |
uses: ad-m/[email protected] | |
with: | |
repository: OneSignal/react-onesignal | |
directory: __clone/react | |
force: true | |
branch: cd_update | |
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[react-onesignal] Submit PR" | |
uses: octokit/[email protected] | |
continue-on-error: true | |
with: | |
route: POST /repos/{owner}/{repo}/pulls | |
owner: OneSignal | |
repo: react-onesignal | |
base: main | |
head: cd_update | |
title: "Generator Update" | |
body: "This update was generated by the GitHub CD action." | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[onesignal-vue] Checkout" | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
repository: OneSignal/onesignal-vue | |
fetch-depth: 0 | |
path: __clone/vue/v2 | |
- name: "[onesignal-vue] Patch" | |
run: | | |
tar zxvvf dist/vue/v2.tgz -C __clone/ | |
cd __clone/vue/v2 | |
git add -A | |
if git commit -m "Update onesignal-vue"; then | |
echo "onesignal-vue repository has been updated" | |
else | |
echo "onesignal-vue repository has NOT been updated, no changes to commit" | |
fi | |
- name: "[onesignal-vue] Push" | |
uses: ad-m/[email protected] | |
with: | |
repository: OneSignal/onesignal-vue | |
directory: __clone/vue/v2 | |
force: true | |
branch: cd_update | |
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[onesignal-vue] Submit PR" | |
uses: octokit/[email protected] | |
continue-on-error: true | |
with: | |
route: POST /repos/{owner}/{repo}/pulls | |
owner: OneSignal | |
repo: onesignal-vue | |
base: main | |
head: cd_update | |
title: "Generator Update" | |
body: "This update was generated by the GitHub CD action." | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[onesignal-vue3] Checkout" | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
repository: OneSignal/onesignal-vue3 | |
fetch-depth: 0 | |
path: __clone/vue/v3 | |
- name: "[onesignal-vue3] Patch" | |
run: | | |
tar zxvvf dist/vue/v3.tgz -C __clone/ | |
cd __clone/vue/v3 | |
git add -A | |
if git commit -m "Update onesignal-vue3"; then | |
echo "onesignal-vue3 repository has been updated" | |
else | |
echo "onesignal-vue3 repository has NOT been updated, no changes to commit" | |
fi | |
- name: "[onesignal-vue3] Push" | |
uses: ad-m/[email protected] | |
with: | |
repository: OneSignal/onesignal-vue3 | |
directory: __clone/vue/v3 | |
force: true | |
branch: cd_update | |
github_token: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} | |
- name: "[onesignal-vue3] Submit PR" | |
uses: octokit/[email protected] | |
continue-on-error: true | |
with: | |
route: POST /repos/{owner}/{repo}/pulls | |
owner: OneSignal | |
repo: onesignal-vue3 | |
base: main | |
head: cd_update | |
title: "Generator Update" | |
body: "This update was generated by the GitHub CD action." | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_WEB_SHIM_PUSH_TOKEN }} |