Skip to content

Commit

Permalink
abc
Browse files Browse the repository at this point in the history
Signed-off-by: Mostafa Dahab <mostafa@dahab.io>
  • Loading branch information
poweroftrue committed Feb 13, 2024
1 parent be7cd57 commit 88c5da0
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/fetch-gem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,29 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags to enable proper comparison and push
fetch-depth: 0 # Fetch all history for all branches and tags

- name: write dummy files
- name: Setup temporary directory
run: |
git remote add gitlab https://gitlab.com/gitlab-org/gitlab.git || true
git config core.sparseCheckout true
echo "vendor/gems/sidekiq-reliable-fetch" > .git/info/sparse-checkout
git fetch gitlab master --depth=1
git checkout FETCH_HEAD
git reset --soft HEAD@{1}
- name: Exclude .github directory and commit changes
mkdir -p ${{ runner.temp }}/vendor
echo "Temp directory for vendor: ${{ runner.temp }}/vendor"
- name: Fetch vendor directory from GitLab
run: |
git clone --depth 1 --filter=blob:none --sparse https://gitlab.com/gitlab-org/gitlab.git ${{ runner.temp }}/gitlab
cd ${{ runner.temp }}/gitlab
git sparse-checkout add vendor/gems/sidekiq-reliable-fetch
git checkout master
- name: Copy sidekiq-reliable-fetch to local repository
run: |
cp -R ${{ runner.temp }}/gitlab/vendor/gems/sidekiq-reliable-fetch/* .
- name: Commit and push changes
run: |
ls -la
git restore --staged .github || echo ".github directory not changed"
git config --global user.name 'Mostafa Dahab'
git config --global user.email 'poweroftrue@users.noreply.github.com'
git add .
git commit -am "Automated report"
# git push origin main --force
git config --global user.name 'Your Name'
git config --global user.email 'youremail@example.com'
git add vendor/gems/sidekiq-reliable-fetch/
git status
git commit -m "Update sidekiq-reliable-fetch gem" || echo "No changes to commit"
git push origin HEAD:main --force

0 comments on commit 88c5da0

Please sign in to comment.