Skip to content

Commit

Permalink
I obviously need the app-frontend repo to run the scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bjosttveit committed Oct 17, 2024
1 parent 8990516 commit 5ac0195
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/scripts/revert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ while [[ $# -gt 0 ]]; do
shift #pop option
shift # pop option
;;
--frontend)
PATH_TO_FRONTEND=$(realpath "$2")
shift # pop option
shift # pop value
;;
--cdn)
PATH_TO_CDN=$(realpath "$2")
shift # pop option
Expand Down Expand Up @@ -57,7 +62,6 @@ while [[ $# -gt 0 ]]; do
esac
done

ROOT=$(pwd)
TARGET=toolkits/altinn-app-frontend
AZURE_TARGET_URI="https://${AZURE_STORAGE_ACCOUNT_NAME}.blob.core.windows.net/app-frontend"

Expand Down Expand Up @@ -166,7 +170,7 @@ else
if [[ "$SYNC_AZURE_CDN" != "no" ]]; then
AFD_PATH_PREFIX="/toolkits/altinn-app-frontend"
AFD_PATHS=( --path "$AFD_PATH_PREFIX/$APP_MAJOR/*" --path "$AFD_PATH_PREFIX/$APP_MAJOR_MINOR/*" )
bash "$ROOT/.github/scripts/purge-frontdoor-cache.sh" "${AFD_PATHS[@]}"
bash "$PATH_TO_FRONTEND/.github/scripts/purge-frontdoor-cache.sh" "${AFD_PATHS[@]}"
echo "-------------------------------------"
fi
fi
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/revert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: app-frontend
sparse-checkout: |
.github
- name: Checkout Altinn-CDN repository
uses: actions/checkout@v4
with:
Expand All @@ -40,6 +47,7 @@ jobs:
--tag "${{ inputs.tag }}" \
--actor "${{ github.actor }}" \
--actor_id "${{ github.actor_id }}" \
--frontend ./app-frontend \
--cdn ./cdn \
--azure-sa-name "${{ secrets.PRODUCTION_STORAGEACCOUNT_NAME }}" \
--azure-sa-token "${{ secrets.PRODUCTION_ALTINN_CDN_SAS_TOKEN }}"
Expand Down

0 comments on commit 5ac0195

Please sign in to comment.