Skip to content

Commit

Permalink
0.1.24
Browse files Browse the repository at this point in the history
IbrahimTanyalcin committed Apr 11, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent c0d8de9 commit d412dc9
Showing 4 changed files with 59 additions and 4 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/sync-public.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: keepCloneUpToDate

on:
schedule:
- cron: '0 8 * * *' # 8:00 AM UTC daily
push:
branches:
- public
pull_request:
branches:
- public
workflow_dispatch:

permissions:
contents: write
issues: read

env:
REMOTE_ADDR: 'https://github.com/IbrahimTanyalcin/I-PV.git'
BRANCH_NAME: 'public'

jobs:
initiate:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/public'
steps:
- name: Checkout and Clean
uses: actions/checkout@v3
with:
repository: 'gsk-tech/I-PV'
ref: ${{ env.BRANCH_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
persist-credentials: true

- name: Configure Git
run: |
git config user.name ${{ secrets.GIT_USER_NAME }}
git config user.email ${{ secrets.GIT_USER_EMAIL }}
git remote add ipvGithub ${{ env.REMOTE_ADDR }}
git fetch ipvGithub master
git fetch --tags -f ipvGithub +master
- name: Rebase and Push Changes if Needed
run: |
if [ $(git rev-parse @) != $(git rev-parse ipvGithub/master) ]; then
echo "Commits NOT equal, rebasing"
git reset --hard ipvGithub/master
git pull --rebase ipvGithub master
git push --force origin ${{ env.BRANCH_NAME }}:${{ env.BRANCH_NAME }}
git push --tags --force origin ${{ env.BRANCH_NAME }}:${{ env.BRANCH_NAME }}
else
echo "Commits equal, no need to pull"
fi
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -56,4 +56,5 @@ npm run publishPatchNPM
## Mirrorring

- Publish scripts automatically run `syncMirror`. For it to work, you must have `mirror.conf.json` that has `path` key, which points to the folder of the mirror. Both root folder and mirror folders are recursively searched with a depth of `5`.
- `azure.yaml` syncs a private azure repository. You can use it for other projects by changing the `REMOTE_ADDR` variable.
- `azure.yaml` syncs a private azure repository. You can use it for other projects by changing the `REMOTE_ADDR` variable.
- `sync-public.yml` is the `azure.yaml` equivalent of syncing public remote master with your fork. For it work, create a remote branch with name `public` and add `GIT_USER_NAME` and `GIT_USER_EMAIL` secrets to your repo.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ibowankenobi-i-pv",
"version": "0.1.23",
"version": "0.1.24",
"org_ipv": {
"version": "2.5"
},

0 comments on commit d412dc9

Please sign in to comment.