Skip to content

Commit

Permalink
ci: update workflows for CDN files
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense committed Jul 30, 2024
1 parent b224115 commit ff25948
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,19 @@ jobs:
run:
working-directory: app/cdn
env:
REMOTE_REPOSITORY: "dvsa/olcs-static"
ASSET_BUCKET: "vol-app-assets"
AWS_OIDC_ROLE: ${{ vars[format('ACCOUNT_nonprod_TF_OIDC{0}_ROLE', (inputs.push && '' || '_READONLY'))] || (inputs.push && vars.TF_OIDC_ROLE || vars.TF_OIDC_READONLY_ROLE) }}
AWS_REGION: ${{ vars.TF_AWS_REGION }}
steps:
- uses: actions/checkout@v4
with:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ inputs.ref || null }}
path: app/cdn
sparse-checkout: app/cdn
fetch-depth: ${{ !inputs.ref && 1 || 0 }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: "npm"
cache-dependency-path: app/cdn/package.json

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
should-build-selfserve: ${{ contains(steps.changed-app-files.outputs.all_changed_files, 'app/selfserve') || null }}
should-build-internal: ${{ contains(steps.changed-app-files.outputs.all_changed_files, 'app/internal') || null }}
# Assets
should-build-assets: ${{ contains(steps.changed-app-files.outputs.all_changed_files, 'app/cdn') || null }}
should-build-assets: ${{ steps.changed-asset-files.outputs.any_changed == 'true' || null }}
# Docker
should-build-docker: ${{ steps.changed-docker-files.outputs.any_changed == 'true' || null }}
should-build-api-docker: ${{ contains(steps.changed-docker-files.outputs.all_changed_files, 'infra/docker/api') || null }}
Expand All @@ -67,7 +67,16 @@ jobs:
with:
dir_names: true
files: |
app/**
app/api/**
app/selfserve/**
app/internal/**
# since_last_remote_commit: true
- uses: tj-actions/changed-files@v44
id: changed-asset-files
with:
dir_names: true
files: |
app/cdn/**
# since_last_remote_commit: true
- uses: tj-actions/changed-files@v44
id: changed-docker-files
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/security-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
run:
working-directory: app
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: dvsa/olcs-backend
Expand Down

0 comments on commit ff25948

Please sign in to comment.