mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-16 16:20:50 +02:00
Fix Nuget cache in CI builds
Package writing was not working correctly due to permissions misconfiguration Change NuGet cache writing scenarios Always write to NuGet cache when building within a tenacityteam repository Signed-off-by: Emily Mabrey <emabrey@tenacityaudio.org>
This commit is contained in:
parent
dce03bae12
commit
d4b13d9c38
32
.github/workflows/cmake_build.yml
vendored
32
.github/workflows/cmake_build.yml
vendored
@ -11,6 +11,20 @@ defaults:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
# See https://docs.github.com/en/rest/reference/permissions-required-for-github-apps
|
||||||
|
# for information on what these individual permissions represent/control
|
||||||
|
permissions:
|
||||||
|
actions: none
|
||||||
|
checks: none
|
||||||
|
contents: read
|
||||||
|
deployments: none
|
||||||
|
issues: none
|
||||||
|
packages: read
|
||||||
|
pull-requests: none
|
||||||
|
repository-projects: none
|
||||||
|
security-events: none
|
||||||
|
statuses: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
skip_test:
|
skip_test:
|
||||||
@ -18,16 +32,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
actions: write
|
actions: write
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
deployments: read
|
|
||||||
issues: read
|
|
||||||
discussions: read
|
|
||||||
packages: read
|
|
||||||
pull-requests: read
|
|
||||||
repository-projects: read
|
|
||||||
security-events: read
|
|
||||||
statuses: read
|
|
||||||
outputs:
|
outputs:
|
||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
@ -46,6 +50,8 @@ jobs:
|
|||||||
if: ${{ needs.skip_test.outputs.should_skip != 'true' }}
|
if: ${{ needs.skip_test.outputs.should_skip != 'true' }}
|
||||||
name: ${{ matrix.config.name }}
|
name: ${{ matrix.config.name }}
|
||||||
runs-on: ${{ matrix.config.os }}
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -198,11 +204,7 @@ jobs:
|
|||||||
rm ./nuget.config
|
rm ./nuget.config
|
||||||
nuget sources add -Name tenacityteam_github_auto -Source https://nuget.pkg.github.com/tenacityteam/index.json -Username tenacityteam -Password ${{ secrets.GITHUB_TOKEN }} -StorePasswordInClearText -ForceEnglishOutput -NonInteractive
|
nuget sources add -Name tenacityteam_github_auto -Source https://nuget.pkg.github.com/tenacityteam/index.json -Username tenacityteam -Password ${{ secrets.GITHUB_TOKEN }} -StorePasswordInClearText -ForceEnglishOutput -NonInteractive
|
||||||
nuget setapikey ${{ secrets.GITHUB_TOKEN }} -Source tenacityteam_github_auto -ForceEnglishOutput -NonInteractive
|
nuget setapikey ${{ secrets.GITHUB_TOKEN }} -Source tenacityteam_github_auto -ForceEnglishOutput -NonInteractive
|
||||||
if [[ ${{ github.event_name }} == 'push' ]]; then
|
echo "VCPKG_BINARY_SOURCES=clear;nuget,tenacityteam_github_auto,readwrite;" >> ${GITHUB_ENV}
|
||||||
echo "VCPKG_BINARY_SOURCES=clear;nuget,tenacityteam_github_auto,readwrite;" >> ${GITHUB_ENV}
|
|
||||||
else
|
|
||||||
echo "VCPKG_BINARY_SOURCES=clear;nuget,tenacityteam_github_auto,read;" >> ${GITHUB_ENV}
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: "[Linux] Install dependencies"
|
- name: "[Linux] Install dependencies"
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user