Skip to content

Fetch Sidekiq Reliable Fetch Gem #21

Fetch Sidekiq Reliable Fetch Gem

Fetch Sidekiq Reliable Fetch Gem #21

Workflow file for this run

name: Fetch Sidekiq Reliable Fetch Gem
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
workflow_dispatch: # Allows manual trigger
permissions:
contents: write
jobs:
sync-gem:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Setup temporary directory
run: |
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: |
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