Skip to content

Commit f070b6a

Browse files
authored
Don't fail if chmod step fails (#263)
1 parent 99f41e4 commit f070b6a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,19 @@ jobs:
4545
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
4646
-
4747
name: Setup Go
48+
id: setup-go
4849
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
4950
with:
5051
go-version: 'stable'
5152
check-latest: true
5253
cache: true
5354
-
5455
name: chmod cache dir
56+
if: steps.setup-go.outputs.cache-hit == 'true'
5557
run: |
5658
chmod -R 0755 \
5759
~/.cache/go-build \
58-
~/go/pkg/mod
60+
~/go/pkg/mod || true
5961
-
6062
name: Action Cache
6163
uses: actions/cache@v4

.github/workflows/goTest.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,18 +88,20 @@ jobs:
8888
git config --global url.https://${{ secrets.PAT }}@github.com/.insteadOf git+ssh://[email protected]
8989
git config --global [email protected]:.insteadOf https://github.com/
9090
-
91-
name: Install Go
91+
name: Setup Go
92+
id: setup-go
9293
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
9394
with:
9495
go-version: ${{ matrix.go }}
9596
check-latest: true
9697
cache: true
9798
-
9899
name: chmod cache dir
100+
if: steps.setup-go.outputs.cache-hit == 'true'
99101
run: |
100102
chmod -R 0755 \
101103
~/.cache/go-build \
102-
~/go/pkg/mod
104+
~/go/pkg/mod || true
103105
-
104106
name: Action Cache
105107
uses: actions/cache@v4

0 commit comments

Comments
 (0)