refactor(dir): ♻️🚧 disable package.lock and GH cache for Dependabot

ref https://github.com/dependabot/dependabot-core/issues/1303
This commit is contained in:
Collin Barrett 2024-06-15 09:51:48 -05:00
parent 8e8428a789
commit 974514fe81
5 changed files with 32 additions and 1190 deletions

View file

@ -21,8 +21,8 @@ jobs:
env:
USER_NAME: github-actions[bot]
USER_EMAIL: github-actions[bot]@users.noreply.github.com
LINT_MESSAGE: 'chore(dir-data): 🎨 lint PR #${{ github.event.number }}'
MIGRATION_MESSAGE: 'chore(dir-data): ♻️ migrate PR #${{ github.event.number }}'
LINT_MESSAGE: "chore(dir-data): 🎨 lint PR #${{ github.event.number }}"
MIGRATION_MESSAGE: "chore(dir-data): ♻️ migrate PR #${{ github.event.number }}"
TEST_MSSQL_IMAGE: mcr.microsoft.com/mssql/server:2022-latest
steps:
@ -31,7 +31,7 @@ jobs:
with:
ref: ${{ github.head_ref }}
fetch-depth: 50 # guess max depth for data migration branch to avoid fetching all while still allowing sync w/upstream
- name: Lint
run: ./lint.sh
working-directory: ./services/Directory/data
@ -61,18 +61,19 @@ jobs:
git revert --no-edit $PREVIOUS_MIGRATION_HASH
fi
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
cache-dependency-path: services/Directory/FilterLists.Directory.Api/packages.lock.json
cache: true
# Disabled GH Actions cache for Dependabot. https://github.com/dependabot/dependabot-core/issues/1303
# - name: Setup .NET
# uses: actions/setup-dotnet@v4
# with:
# cache-dependency-path: services/Directory/FilterLists.Directory.Api/packages.lock.json
# cache: true
- name: Install dotnet-ef
run: dotnet tool install --global dotnet-ef
- name: Restore
run: dotnet restore --locked-mode
working-directory: ./services/Directory/FilterLists.Directory.Api
# - name: Restore
# run: dotnet restore --locked-mode
# working-directory: ./services/Directory/FilterLists.Directory.Api
- name: Add Migration
run: >
@ -122,4 +123,4 @@ jobs:
working-directory: ./services/Directory
- name: git push
run: git push
run: git push

View file

@ -24,7 +24,7 @@ env:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
@ -37,15 +37,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
cache-dependency-path: services/Directory/FilterLists.Directory.Api/packages.lock.json
cache: true
# Disabled GH Actions cache for Dependabot. https://github.com/dependabot/dependabot-core/issues/1303
# - name: Setup .NET
# uses: actions/setup-dotnet@v4
# with:
# cache-dependency-path: services/Directory/FilterLists.Directory.Api/packages.lock.json
# cache: true
- name: Restore
run: dotnet restore --locked-mode
working-directory: ./services/Directory/FilterLists.Directory.Api
# - name: Restore
# run: dotnet restore --locked-mode
# working-directory: ./services/Directory/FilterLists.Directory.Api
- name: Build
run: dotnet build -c Release
@ -91,4 +92,4 @@ jobs:
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE_APP_FILTERLISTS_DIRECTORY_PROD }}
images: ${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_REPOSITORY }}:${{ env.CONTAINER_IMAGE_TAG_UNIQUE }}
images: ${{ env.CONTAINER_REGISTRY }}/${{ env.CONTAINER_REPOSITORY }}:${{ env.CONTAINER_IMAGE_TAG_UNIQUE }}

View file

@ -25,7 +25,7 @@ jobs:
environment:
name: staging-web
url: ${{ steps.builddeploy.outputs.static_web_app_url }}
url: ${{ steps.builddeploy.outputs.static_web_app_url }}
steps:
- name: Checkout
@ -66,7 +66,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: upload
app_location: ./web/build
output_location: ''
output_location: ""
skip_app_build: true
continue-on-error: true
@ -79,7 +79,7 @@ jobs:
environment:
name: production-web
url: https://filterlists.com
url: https://filterlists.com
steps:
- name: Checkout
@ -112,7 +112,7 @@ jobs:
repo_token: ${{ secrets.GITHUB_TOKEN }}
action: upload
app_location: ./web/build
output_location: ''
output_location: ""
skip_app_build: true
close_pull_request:
@ -128,4 +128,4 @@ jobs:
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_STAPP_FILTERLISTS_PROD }}
action: close
app_location: ./web
app_location: ./web

View file

@ -8,7 +8,9 @@
</PropertyGroup>
<PropertyGroup>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<!-- Disabled GH Actions cache for Dependabot. https://github.com/dependabot/dependabot-core/issues/1303 -->
<!-- <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> -->
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
<ContainerBaseImage>mcr.microsoft.com/dotnet/runtime-deps:8.0-jammy-chiseled-extra</ContainerBaseImage>

File diff suppressed because it is too large Load diff