Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ jobs:
RUNNER_TEMP: ${{ runner.temp }}
WORKFLOW_VERSION: ${{ inputs._workflow_version }}
run: |
mkdir -p "$RUNNER_TEMP/ghwf"
cd "$RUNNER_TEMP/ghwf"
New-Item -ItemType Directory -Path "$env:RUNNER_TEMP/ghwf" -Force
cd "$env:RUNNER_TEMP/ghwf"
git init
git remote add origin https://github.com/getsentry/github-workflows.git
git fetch --depth 1 origin "$WORKFLOW_VERSION"
git fetch --depth 1 origin "$env:WORKFLOW_VERSION"
git checkout FETCH_HEAD

- name: Update to the latest version
Expand All @@ -128,7 +128,8 @@ jobs:
RUNNER_TEMP: ${{ runner.temp }}
INPUT_PATH: ${{ inputs.path }}
INPUT_PATTERN: ${{ inputs.pattern }}
run: "$env:RUNNER_TEMP/ghwf/updater/scripts/update-dependency.ps1" -Path "$env:INPUT_PATH" -Pattern "$env:INPUT_PATTERN"
run: |
& "$env:RUNNER_TEMP/ghwf/updater/scripts/update-dependency.ps1" -Path "$env:INPUT_PATH" -Pattern "$env:INPUT_PATTERN"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

& evaluates the expression so it beats the purpose of the whole env var thing as a protection against code injection


- name: Get the base repo info
if: steps.target.outputs.latestTag != steps.target.outputs.originalTag
Expand All @@ -145,7 +146,7 @@ jobs:
}
"baseBranch=$mainBranch" | Tee-Object $env:GITHUB_OUTPUT -Append
"prBranch=$prBranch" | Tee-Object $env:GITHUB_OUTPUT -Append
$nonBotCommits = "$env:RUNNER_TEMP/ghwf/updater/scripts/nonbot-commits.ps1" `
$nonBotCommits = & "$env:RUNNER_TEMP/ghwf/updater/scripts/nonbot-commits.ps1" `
-RepoUrl "$(git config --get remote.origin.url)" -PrBranch $prBranch -MainBranch $mainBranch
$changed = $nonBotCommits.Length -gt 0 ? 'true' : 'false'
"changed=$changed" | Tee-Object $env:GITHUB_OUTPUT -Append
Expand Down Expand Up @@ -243,7 +244,8 @@ jobs:
RUNNER_TEMP: ${{ runner.temp }}
INPUT_PATH: ${{ inputs.path }}
LATEST_TAG: ${{ steps.target.outputs.latestTag }}
run: "$env:RUNNER_TEMP/ghwf/updater/scripts/update-dependency.ps1" -Path "$env:INPUT_PATH" -Tag "$env:LATEST_TAG"
run: |
& "$env:RUNNER_TEMP/ghwf/updater/scripts/update-dependency.ps1" -Path "$env:INPUT_PATH" -Tag "$env:LATEST_TAG"

- name: Update Changelog
if: ${{ inputs.changelog-entry && ( steps.target.outputs.latestTag != steps.target.outputs.originalTag ) && ( steps.root.outputs.changed == 'false') }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Fix updater.yml syntax errors ([#96](https://github.com/getsentry/github-workflows/pull/96))

## 2.13.0

### Features
Expand Down