-
Notifications
You must be signed in to change notification settings - Fork 0
fix: refine workflow #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: refine workflow #176
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,8 @@ | ||||||
| name: Release framework | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
|
|
||||||
| on: | ||||||
| pull_request: | ||||||
| types: | ||||||
|
|
@@ -29,18 +32,23 @@ jobs: | |||||
| steps: | ||||||
| - name: Check release conditions | ||||||
| id: check | ||||||
| env: | ||||||
| EVENT_NAME: ${{ github.event_name }} | ||||||
| REF_NAME: ${{ github.ref_name }} | ||||||
| HEAD_REF: ${{ github.head_ref }} | ||||||
| PR_MERGED: ${{ github.event.pull_request.merged }} | ||||||
| run: | | ||||||
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | ||||||
| if [[ "$EVENT_NAME" == "workflow_dispatch" ]]; then | ||||||
| # workflow_dispatch: only allow on master branch | ||||||
| if [[ "${{ github.ref_name }}" == "master" ]]; then | ||||||
| if [[ "$REF_NAME" == "master" ]]; then | ||||||
| echo "should_release=true" >> $GITHUB_OUTPUT | ||||||
| else | ||||||
| echo "should_release=false" >> $GITHUB_OUTPUT | ||||||
| fi | ||||||
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||||||
| elif [[ "$EVENT_NAME" == "pull_request" ]]; then | ||||||
| # PR: check if it's a release/prerelease branch and merged | ||||||
| head_ref="${{ github.head_ref }}" | ||||||
| is_merged=${{ github.event.pull_request.merged }} | ||||||
| head_ref="$HEAD_REF" | ||||||
| is_merged="$PR_MERGED" | ||||||
|
|
||||||
| if [[ ("$head_ref" == release* || "$head_ref" == prerelease*) && "$is_merged" == "true" ]]; then | ||||||
| echo "should_release=true" >> $GITHUB_OUTPUT | ||||||
|
|
@@ -59,7 +67,7 @@ jobs: | |||||
| release_created: ${{ steps.release.outputs.created }} | ||||||
| steps: | ||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@v4 | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
|
|
||||||
| - name: Setup gem | ||||||
| uses: appier/appier-ios-framework/.github/actions/install_gem_dependencies@master | ||||||
|
||||||
| uses: appier/appier-ios-framework/.github/actions/install_gem_dependencies@master | |
| uses: ./.github/actions/install_gem_dependencies |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
install_gem_dependencies is referenced via @master, which is a mutable ref. To keep workflows reproducible and reduce supply-chain risk (especially now that other actions are pinned), consider pinning this to a commit SHA.
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This step still uses install_gem_dependencies@master (mutable ref). If the goal is fully deterministic workflows, pin this action to a commit SHA here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR_TITLEcomes from the PR metadata and can contain newlines or other characters that can break the$GITHUB_OUTPUTfile format (output injection), potentially corrupting subsequent outputs and the Slack payload. Write this output using the multiline<<EOFsyntax (or otherwise escape/encode the value) rather thanecho PR="$PR_TITLE" >> $GITHUB_OUTPUT.