From 4329cdb6c4228f9c4975a7bea31892a966940183 Mon Sep 17 00:00:00 2001 From: McCloudS <64094529+McCloudS@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:16:50 -0600 Subject: [PATCH] Create calver.yml --- .github/workflows/calver.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/calver.yml diff --git a/.github/workflows/calver.yml b/.github/workflows/calver.yml new file mode 100644 index 0000000..552a571 --- /dev/null +++ b/.github/workflows/calver.yml @@ -0,0 +1,38 @@ +name: Build_Subgen_Dockerfile + +on: + push: + branches: + - 'main' + paths-ignore: + - '**.md' + - '**.yml' + workflow_dispatch: + +jobs: + + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set Calver Version + uses: Nelyx/action-calver@v1.0.0 + id: setcalver + with: + default_branch: 'refs/heads/main' + format: 'YYYY.M.D' + version_prefix: '' + - name: Update version file + run: | + sed -i "s/subgen_version =.*/subgen_version = '${{ steps.setcalver.outputs.package_version }}'/" subgen/subgen.py + + - name: Commit and push changes + run: | + git config --global user.name "GitHub Actions" + git config --global user.email "actions@github.com" + git add subgen/subgen.py + git commit -m "Automated update subgen.py with version" + git push