Skip to content

Commit

Permalink
fix: iterate over releases from env var
Browse files Browse the repository at this point in the history
This fixes an issue where single quotes within releases were not escaped.
  • Loading branch information
lukekarrys committed Apr 15, 2024
1 parent 1106838 commit e23e095
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
- name: Publish
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
RELEASES: ${{ inputs.releases }}
run: |
EXIT_CODE=0
Expand All @@ -65,7 +66,7 @@ jobs:
fi
}
for release in $(echo '${{ inputs.releases }}' | jq -r '.[] | @base64'); do
for release in $(echo $RELEASES | jq -r '.[] | @base64'); do
PUBLISH_TAG=$(echo "$release" | base64 --decode | jq -r .publishTag)
STATUS=$(each_release "$PUBLISH_TAG")
if [[ "$STATUS" -eq 1 ]]; then
Expand Down
3 changes: 2 additions & 1 deletion lib/content/_job-release-integration-yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ steps:
- name: Publish
env:
PUBLISH_TOKEN: $\{{ secrets.PUBLISH_TOKEN }}
RELEASES: $\{{ inputs.releases }}
{{else}}
{{> stepsSetupYml }}
- name: Check If Published
Expand All @@ -30,7 +31,7 @@ steps:
fi
}

for release in $(echo '$\{{ inputs.releases }}' | jq -r '.[] | @base64'); do
for release in $(echo $RELEASES | jq -r '.[] | @base64'); do
{{#if publish}}
PUBLISH_TAG=$(echo "$release" | base64 --decode | jq -r .publishTag)
STATUS=$(each_release "$PUBLISH_TAG")
Expand Down
6 changes: 3 additions & 3 deletions tap-snapshots/test/apply/source-snapshots.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ jobs:
fi
}
for release in $(echo '\${{ inputs.releases }}' | jq -r '.[] | @base64'); do
for release in $(echo $RELEASES | jq -r '.[] | @base64'); do
SPEC="$(echo "$release" | base64 --decode | jq -r .pkgName)@$(echo "$release" | base64 --decode | jq -r .version)"
STATUS=$(each_release "$SPEC")
if [[ "$STATUS" -eq 1 ]]; then
Expand Down Expand Up @@ -2537,7 +2537,7 @@ jobs:
fi
}
for release in $(echo '\${{ inputs.releases }}' | jq -r '.[] | @base64'); do
for release in $(echo $RELEASES | jq -r '.[] | @base64'); do
SPEC="$(echo "$release" | base64 --decode | jq -r .pkgName)@$(echo "$release" | base64 --decode | jq -r .version)"
STATUS=$(each_release "$SPEC")
if [[ "$STATUS" -eq 1 ]]; then
Expand Down Expand Up @@ -4051,7 +4051,7 @@ jobs:
fi
}
for release in $(echo '\${{ inputs.releases }}' | jq -r '.[] | @base64'); do
for release in $(echo $RELEASES | jq -r '.[] | @base64'); do
SPEC="$(echo "$release" | base64 --decode | jq -r .pkgName)@$(echo "$release" | base64 --decode | jq -r .version)"
STATUS=$(each_release "$SPEC")
if [[ "$STATUS" -eq 1 ]]; then
Expand Down

0 comments on commit e23e095

Please sign in to comment.