Skip to content
Closed
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
8 changes: 7 additions & 1 deletion .github/workflows/test-connect-popup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,19 @@ jobs:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extract_branch.outputs.branch }}
sanitized_branch: ${{ steps.sanitize_branch.outputs.sanitized_branch }}
steps:
- name: Extract branch name
id: extract_branch
run: |
BRANCH_NAME="${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}"
echo "branch=$BRANCH_NAME" >> $GITHUB_OUTPUT

- name: Sanitize branch name for URLs
id: sanitize_branch
run: |
echo "sanitized_branch=$(echo '${{ steps.extract_branch.outputs.branch }}' | tr -d '+#@&=?\\:*')" >> "$GITHUB_OUTPUT"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

technically, chars ?\:* do not need to be handled because that's an invalid branch name (git won't allow to create it), but I put it there anyway so it's clearer what kind of bugs does this solve


build-deploy:
needs: [extract-branch]
runs-on: ubuntu-latest
Expand All @@ -64,7 +70,7 @@ jobs:
awsRoleToAssume: "arn:aws:iam::538326561891:role/gh_actions_trezor_suite_dev_deploy"
awsRegion: "eu-central-1"
serverHostname: "dev.suite.sldev.cz"
serverPath: "connect/${{ needs.extract-branch.outputs.branch }}"
serverPath: "connect/${{ needs.extract-branch.outputs.sanitized_branch }}"
uploadArtifacts: "true"
buildArtifacts: "true"
nodeEnv: "development"
Expand Down