Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
ci: Fix cache CI job in main (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
RothAndrew authored Dec 5, 2023
1 parent a441362 commit 479a907
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/actions/autoformat/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ runs:
- name: Fix cache permissions
shell: bash -e -o pipefail {0}
run: script -q -e -c 'make _fix-cache-permissions' /dev/null
run: script -q -e -c 'make +fix-cache-permissions' /dev/null

# Use the GraphQL API to commit changes, so we get automatic commit signing
# The REST contents API can't be used as easily because it only supports making single file commits
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/pre-commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

- name: Fix cache permissions
shell: bash -e -o pipefail {0}
run: script -q -e -c 'make _fix-cache-permissions' /dev/null
run: script -q -e -c 'make +fix-cache-permissions' /dev/null
2 changes: 1 addition & 1 deletion .github/workflows/save-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: update-cache
run: script -q -e -c 'make +update-cache' /dev/null
- name: Fix cache permissions
run: script -q -e -c 'make _fix-cache-permissions' /dev/null
run: script -q -e -c 'make +fix-cache-permissions' /dev/null
- name: save-cache
uses: ./.github/actions/cache
with:
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ _prereqs: #_# Run prerequisite checks
docker run ${ALL_THE_DOCKER_ARGS} \
bash -c 'git config --global --add safe.directory /app \
&& pre-commit install --install-hooks \
&& go test -run=SomeTestNameThatIsntReal ./... \
&& (cd deployments/on-prem-lite/terraform && terraform init)'

.PHONY: +runhooks
Expand All @@ -377,8 +376,8 @@ _prereqs: #_# Run prerequisite checks
+pre-commit-common: #+# [Docker] Run common pre-commit hooks
$(MAKE) +runhooks HOOK="" SKIP="terraform_fmt,terraform_docs,terraform_checkov,terraform_tflint,renovate-config-validator"

.PHONY: _fix-cache-permissions
_fix-cache-permissions: #+# [Docker] Fix permissions on the .cache folder
.PHONY: +fix-cache-permissions
+fix-cache-permissions: #+# [Docker] Fix permissions on the .cache folder
docker run $(TTY_ARG) --rm -v "${PWD}:/app" --workdir "/app" -e "PRE_COMMIT_HOME=/app/.cache/pre-commit" ${BUILD_HARNESS_REPO}:${BUILD_HARNESS_VERSION} chmod -R a+rx .cache

.PHONY: +autoformat
Expand Down

0 comments on commit 479a907

Please sign in to comment.