Skip to content

Merge pull request #8 from ai4os/new-metadata #10

Merge pull request #8 from ai4os/new-metadata

Merge pull request #8 from ai4os/new-metadata #10

name: version-update
on:
push:
branches:
- 'main'
paths:
- 'VERSION'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
export VERSION=$(cat VERSION |tr -d "\n\r")
echo "Found ${VERSION} version"
sed -i "s/\"__ai4_template\":.*/\"__ai4_template\": \"ai4-template\/${VERSION}\",/I" cookiecutter.json
git commit -a -m "chore: (actions) Update cookiecutter.json with ai4-template/${VERSION}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
branch: ${{ github.head_ref }}