diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..f79ba75 Binary files /dev/null and b/.DS_Store differ diff --git a/.gitea/workflows/log-push.yml b/.gitea/workflows/log-push.yml new file mode 100644 index 0000000..16c188c --- /dev/null +++ b/.gitea/workflows/log-push.yml @@ -0,0 +1,46 @@ +name: Log every push + +on: + push: + +jobs: + log-push: + runs-on: windows + + defaults: + run: + shell: powershell + + steps: + - name: Append push info to txt log + env: + PUSHER: ${{ gitea.actor }} + REF: ${{ gitea.ref }} + REPO: ${{ gitea.repository }} + COMMITS_JSON: ${{ toJson(github.event.commits) }} + run: | + $logDir = "C:\gitea-logs" + $logFile = Join-Path $logDir "push-log.txt" + + New-Item -ItemType Directory -Path $logDir -Force | Out-Null + + $branch = $env:REF -replace '^refs/heads/', '' + $time = Get-Date -Format "yyyy-MM-dd HH:mm:ss" + + Add-Content -Path $logFile -Value "========================================" + Add-Content -Path $logFile -Value "Time: $time" + Add-Content -Path $logFile -Value "Repo: $env:REPO" + Add-Content -Path $logFile -Value "Pusher: $env:PUSHER" + Add-Content -Path $logFile -Value "Branch: $branch" + Add-Content -Path $logFile -Value "Commits:" + + $commits = $env:COMMITS_JSON | ConvertFrom-Json + + foreach ($commit in $commits) + { + Add-Content -Path $logFile -Value " - SHA: $($commit.id)" + Add-Content -Path $logFile -Value " Author: $($commit.author.name) <$($commit.author.email)>" + Add-Content -Path $logFile -Value " Message: $($commit.message)" + } + + Add-Content -Path $logFile -Value "" \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file