Merge pull request #433 from tiiuae/cbma-ba-functional-tests #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |