-
Notifications
You must be signed in to change notification settings - Fork 253
37 lines (33 loc) · 1.15 KB
/
bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Bump cacert.pem
on:
workflow_dispatch:
schedule:
# Run daily
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
bump:
if: github.repository_owner == 'certifi'
runs-on: ubuntu-latest
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- run: make update
- name: Update date
id: update-date
run: |
if ! git diff --quiet certifi/cacert.pem ; then
DATE=$(date +"%Y.%m.%d")
sed -E -i "s/__version__ = .*/__version__ = \"${DATE}\"/" certifi/__init__.py
echo "DATE=${DATE}" >> $GITHUB_OUTPUT
fi
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5.0.2
with:
commit-message: "${{ steps.update-date.outputs.DATE }}"
title: "${{ steps.update-date.outputs.DATE }}"
token: ${{ secrets.GITHUB_TOKEN }}
if: steps.update-date.outputs.DATE