Skip to content

Merge pull request #138 from ScottSloan/dev #22

Merge pull request #138 from ScottSloan/dev

Merge pull request #138 from ScottSloan/dev #22

Workflow file for this run

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