77ee1faed2
ci was failing due to wrong python version
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: generate-svg-counter
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
generate-counter:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.11.2'
|
|
cache: 'poetry'
|
|
- name: Generate shields.io URL
|
|
run: python generate_shield.py atomics/
|
|
id: shield
|
|
- name: Generate shields.io URL
|
|
run: python generate_counter.py -d atomics/
|
|
id: counter
|
|
- name: Update README
|
|
run: |
|
|
sed -i "s|https://img.shields.io/badge/Atomics-.*-flat.svg|${{ steps.counter.outputs.result }}|" README.md
|
|
shell: bash
|
|
- name: update github with new site
|
|
run: |
|
|
# configure git to prep for commit
|
|
git config user.email "opensource@redcanary.com"
|
|
git config user.name "publish bot"
|
|
git config --global push.default simple
|
|
git add README.md
|
|
git commit --allow-empty -m "updating atomics count in README.md [ci skip]"
|
|
# push quietly to prevent showing the token in log
|
|
# no need to provide any credentials
|
|
git push
|