Skip to content

Commit

Permalink
Merge pull request #432 from tiiuae/autocreate-version-file
Browse files Browse the repository at this point in the history
  • Loading branch information
TIISR authored Apr 3, 2024
2 parents 15afa8e + ac7d039 commit c9839b9
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Version File
on:
push:
branches:
- main
- develop
jobs:
version-file:
runs-on: ubuntu-latest
permissions:
contents: write
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Create VERSION file
run: |
{
echo GIT_SHA=$GITHUB_SHA
echo EPOCH_TIMESTAMP=$(date +%s)
echo PRECISE_DATE_TIMESTAMP=\"$(date "+%Y-%m-%d - %H:%M:%S.%N")\"
} > VERSION
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'Update VERSION'
disable_globbing: true
file_pattern: VERSION

0 comments on commit c9839b9

Please sign in to comment.