Skip to content

Commit

Permalink
ci: init cache before task, use --user root
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Sep 29, 2023
1 parent 3ee6a85 commit 0e54f89
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/doxygen_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ jobs:
- name: Setup Doxygen
run: sudo apt-get update && sudo apt-get install -y doxygen

- name: Build Doxygen Docs
run: |
cd docs
doxygen
- name: Write cache
if: ${{ inputs.cache_key != '' }}
uses: actions/cache@v3
Expand All @@ -36,3 +31,8 @@ jobs:
.cache
${{ inputs.cache_paths }}
key: ${{ inputs.cache_key }}

- name: Build Doxygen Docs
run: |
cd docs
doxygen
3 changes: 2 additions & 1 deletion .github/workflows/mkdocs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
runs-on: ubuntu-latest
container:
image: ${{ inputs.image }}
options: --user root

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -37,7 +39,6 @@ jobs:
path: |
.cache
${{ inputs.cache_paths }}
key: ${{ inputs.cache_key }}
restore-keys: ${{ inputs.cache_key }}

- name: Publish
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/openapi_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,25 @@ jobs:
runs-on: ubuntu-latest
container:
image: ${{ inputs.image }}
options: --user root

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Write cache
if: ${{ inputs.cache_key != '' }}
uses: actions/cache@v3
with:
path: |
.cache
${{ inputs.cache_paths }}
key: ${{ inputs.cache_key }}

- name: Build OpenAPi JSON
env:
EXAMPLE_DOT_ENV: ${{ inputs.example_env_file_path }}
run: |
chmod -R 777 .
python - <<EOF
"""Get OpenAPI config from FastAPI and write to file."""
Expand Down Expand Up @@ -66,12 +75,3 @@ jobs:
)
json.dump(openapi, f, separators=(",", ":"))
EOF
- name: Write cache
if: ${{ inputs.cache_key != '' }}
uses: actions/cache@v3
with:
path: |
.cache
${{ inputs.cache_paths }}
key: ${{ inputs.cache_key }}

0 comments on commit 0e54f89

Please sign in to comment.