Skip to content

Commit

Permalink
artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
RusabKhan committed Jan 26, 2024
1 parent ae63db9 commit 7c02e2c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 19 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/download_and_sync_repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
workflow_run:
workflows: ["Sync Repositories"]
types:
- completed

jobs:
sync:
runs-on: ubuntu-latest

steps:
- name: Download Repository Artifact
uses: actions/download-artifact@v2
with:
name: repository-artifact

- name: Checkout Target Repository
uses: actions/checkout@v2

- name: Sync Changes
run: |
cp -r ${{ github.workspace }}/repository-artifact/* .
- name: Commit and Push Changes
run: |
git add .
git commit -m "Sync changes from source repository"
git push
28 changes: 9 additions & 19 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Sync to OpenETL Pro
name: Sync Repositories

on:
push:
Expand All @@ -10,22 +10,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check out OpenETL Pro repository
uses: actions/checkout@v2
with:
repository: RusabKhan/OpenETL-Pro
path: OpenETL-Pro
refs: actions
- name: Checkout Source Repository
uses: actions/checkout@v2

- name: Push changes to develop branch of OpenETL Pro
run: |
cd OpenETL-Pro
git config --global user.email "rusabkhan7@gmail.com"
git config --global user.name "Rusab Khan"
git checkout develop
git pull origin develop
cp -R ../. .
git add .
git commit -m "Sync changes from main branch of OpenETL"
git push origin develop
- name: Upload Repository as Artifact
uses: actions/upload-artifact@v2
with:
name: repository-artifact
path: . # Upload the entire repository

0 comments on commit 7c02e2c

Please sign in to comment.