Skip to content

Commit

Permalink
Merge branch 'main' into fix-replace-underscores-links-2024-10-25
Browse files Browse the repository at this point in the history
  • Loading branch information
fredericsimard authored Oct 28, 2024
2 parents 3eb696d + 7e1a419 commit 83b0f8d
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/Build Swift scripts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Swift scripts

on:
workflow_dispatch:
push:
branches:
- main
paths:
- '**.swift'
pull_request:
branches:
- main
paths:
- '**.swift'

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, macos-15, ubuntu-latest] # macos 15 comes with Swift 6 which has breaking changes vs Swift 5.*
fail-fast: false

steps:
- name: Checkout code
uses: actions/checkout@v4.2.2
- name: Print Swift version
run: swift --version
- name: Build Swift scripts
run: swiftc scripts/*.swift || exit 1

check-builds:
needs: build
runs-on: ubuntu-latest
if: always()
steps:
- name: Check build matrix status
run: |
if [[ "${{ needs.build.result }}" == "failure" || "${{ needs.build.result }}" == "cancelled" ]]; then
echo "One or more builds failed"
exit 1
fi
13 changes: 10 additions & 3 deletions .github/workflows/monitor-remote-repos-for-new-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,23 @@ jobs:
FOUND_COMMITS=$(echo "$swift_output" | jq -r '.found_commits')
BRANCH_NAME=$(echo "$swift_output" | jq -r '.branch_name')
ISSUE_TITLE=$(echo "$swift_output" | jq -r '.issue_title')
# First get the escaped version for workflow variables
ISSUE_BODY=$(echo "$swift_output" | jq -r '.issue_body' | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/|/\\|/g')
# Output the regular variables
echo "found_commits=$FOUND_COMMITS" >> $GITHUB_OUTPUT
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "issue_title=$ISSUE_TITLE" >> $GITHUB_OUTPUT
echo "issue_body=$ISSUE_BODY" >> $GITHUB_OUTPUT
# Output the unescaped body using EOF delimiter for proper multiline handling
echo "issue_body<<EOF" >> $GITHUB_OUTPUT
echo "$swift_output" | jq -r '.issue_body' >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create issue
id: create-issue
# if: steps.parse-output.outputs.found_commits == 'true'
if: steps.parse-output.outputs.found_commits == 'true'
uses: dacbd/create-issue-action@v2.0.0
with:
token: ${{ env.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ overrides/pt/*
overrides/ru/*
overrides/zh/*
overrides/zh-TW/*
/.cache
/.cache

0 comments on commit 83b0f8d

Please sign in to comment.