Merge pull request #138 from ScottSloan/dev #22
This file contains hidden or 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: Update Commit Hash | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Update commit hash | |
run: | | |
$currentDate = Get-Date | |
$timezone = [System.TimeZoneInfo]::FindSystemTimeZoneById("China Standard Time") | |
$convertedDate = [System.TimeZoneInfo]::ConvertTime($currentDate, $timezone) | |
$date = $convertedDate.ToString("yyyy-MM-dd HH:mm:ss") | |
$commit = git rev-parse main | |
$content = "date = ""$date""" + "`n" + "commit = ""$commit""" + "`n" + "compile = False" | |
Set-Content -Path "src/utils/common/compile_data.py" -Value $content |