Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add piplock-renewal worflow for the main branch #699

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/piplock-renewal-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# This GitHub action is meant to be triggered weekly in order to update the pipfile.locks

name: Weekly Pipfile.locks renewal on [main] branch

on: # yamllint disable-line rule:truthy
# Triggers the workflow every Monday at 22pm UTC am 0 22 * * 1
schedule:
- cron: "0 22 * * 1"
workflow_dispatch: # for manual trigger workflow from GH Web UI

jobs:
build:
runs-on: ubuntu-latest

permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
# Checkout the paricular branch
- name: Checkout code from the release branch
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.GH_ACCESS_TOKEN }}

# Setup Python environment
- name: Setup Python environment
uses: actions/setup-python@v5
with:
python-version: |
3.9
3.11
- name: Install pipenv
run: pip install pipenv

# Runs the makefile recipe `refresh-pipfilelock-files` and push the chances back to the branch
- name: Run make refresh-pipfilelock-files and push the chances back to the branch
run: |
make refresh-pipfilelock-files
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Update the pipfile.lock via the weekly workflow action"
git push