Browse Source

Merge pull request #307 from trojikman/8.0-workflow-update

commit is created by 👷‍♂️ Merge Bot: https://odoo-devops.readthedocs.io/en/latest/git/github-merge-bot.html
pull/309/head
Mitchell Admin 4 years ago
committed by GitHub
parent
commit
7b9820ad34
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      .github/workflows/repo2store.yml

34
.github/workflows/repo2store.yml

@ -0,0 +1,34 @@
name: "Push Updates to REPO-store"
on:
push:
jobs:
repo2store:
runs-on: ubuntu-latest
if:
"! endsWith(github.repository, '-store') && startsWith(github.repository,
'itpp-labs/')"
steps:
- name: Checkout REPO
uses: actions/checkout@v2-beta
with:
fetch-depth: 0
# custom token is not needed for fetching REPO,
# but the action makes some magic with authentication headers
# which are used on pushing to REPO-store
token: ${{ secrets.DINAR_TOKEN }}
- name: Fetch REPO-store
run: |
git remote add store https://x-access-token:${{ secrets.DINAR_TOKEN }}@github.com/${GITHUB_REPOSITORY}-store.git
git fetch store
- name: Merge and Push
run: |
set -x
git config --global user.email "itpp-bot@users.noreply.github.com"
git config --global user.name "Mitchell Admin"
BRANCH=${GITHUB_REF##*/}
REF=$(git rev-parse HEAD)
git checkout -b $BRANCH-store store/$BRANCH
git merge origin/$BRANCH $REF
git push store $BRANCH-store:$BRANCH
Loading…
Cancel
Save