Skip to content

Commit 922d443

Browse files
committed
ci: remove hashFiles usage; refine project sync permissions
1 parent e7984d6 commit 922d443

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,21 @@ jobs:
2222
swift --version || echo 'swift not installed'
2323
python --version
2424
- name: Build
25-
if: ${{ hashFiles('Package.swift') != '' }}
26-
run: swift build -v
25+
run: |
26+
if [ -f Package.swift ]; then
27+
echo "Building Swift package";
28+
swift build -v;
29+
else
30+
echo "Skipping build: Package.swift not present";
31+
fi
2732
- name: Test
28-
if: ${{ hashFiles('Package.swift') != '' }}
29-
run: swift test -v
33+
run: |
34+
if [ -f Package.swift ]; then
35+
echo "Running tests";
36+
swift test -v;
37+
else
38+
echo "Skipping tests: Package.swift not present";
39+
fi
3040
- name: Validate YAML configs
3141
run: |
3242
pip install pyyaml
@@ -69,10 +79,19 @@ jobs:
6979
folder-path: '.'
7080
swift-lint:
7181
runs-on: macos-14
72-
if: ${{ hashFiles('Package.swift') != '' }}
7382
steps:
7483
- uses: actions/checkout@v4
7584
- name: Install SwiftFormat (placeholder)
76-
run: brew install swiftformat || true
85+
run: |
86+
if [ -f Package.swift ]; then
87+
brew install swiftformat || true
88+
else
89+
echo "Skipping swiftformat install: no Package.swift";
90+
fi
7791
- name: Dry run format check
78-
run: swiftformat . --lint || true
92+
run: |
93+
if [ -f Package.swift ]; then
94+
swiftformat . --lint || true
95+
else
96+
echo "Skipping lint: no Package.swift";
97+
fi

.github/workflows/project-sync.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ permissions:
1212
contents: read
1313
issues: write
1414
pull-requests: read
15-
projects: write
1615

1716
env:
1817
# Set these to match your environment.
1918
GITHUB_USER: pynip
2019
# Replace with the numeric project number for "Virtualization Studio ARM macOS"
21-
PROJECT_NUMBER: 1 # <-- UPDATE this after creating the project
20+
PROJECT_NUMBER: 3 # Project number extracted from https://github.com/users/pynip/projects/3
2221
# Status names expected in the project's single-select Status field
2322
STATUS_TODO_NAME: "To do"
2423
STATUS_INPROGRESS_NAME: "In Progress"

0 commit comments

Comments
 (0)