From cb92c19a82901b3a716f33545cdf517a166a3525 Mon Sep 17 00:00:00 2001 From: Gerrit91 Date: Mon, 26 Feb 2024 14:13:44 +0100 Subject: [PATCH] Update actions. --- .github/workflows/master.yml | 6 +++--- .github/workflows/pr.yml | 19 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index a2f0738..647b4c0 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -8,9 +8,9 @@ on: jobs: build: - + runs-on: ubuntu-22.04 - + strategy: matrix: kernel: ["6.6.18"] @@ -41,7 +41,7 @@ jobs: prerelease: false - name: Upload Release Asset - id: upload-release-asset + id: upload-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 388117c..2b055f9 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -10,7 +10,7 @@ env: jobs: build: runs-on: ubuntu-22.04 - + strategy: matrix: kernel: ["6.6.18"] @@ -19,9 +19,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Figure out if running fork PR - id: fork - run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"' + - uses: google-github-actions/auth@v2 + with: + credentials_json: '${{ secrets.GCP_SA_KEY }}' + + - name: Set up Cloud SDK + uses: google-github-actions/setup-gcloud@v2 - name: Build project # This would actually build your project, using zip for an example artifact run: | @@ -33,11 +36,5 @@ jobs: tar -xf kernel.tar metal-kernel cp metal-kernel metal-kernel-${{ matrix.kernel }}-pr-${GITHUB_HEAD_REF##*/} - - uses: google-github-actions/setup-gcloud@v0 - with: - service_account_email: ${{ secrets.GCP_SA_EMAIL }} - service_account_key: ${{ secrets.GCP_SA_KEY }} - - name: Upload kernel to GCS - run: gsutil -m cp -r metal-kernel gs://$GCS_BUCKET/metal-kernel/pull_requests/metal-kernel-${{ matrix.kernel }} - if: steps.fork.outputs.is_fork_pr == 'false' + run: gsutil -m -h "Cache-Control:no-store" cp -r metal-kernel gs://$GCS_BUCKET/metal-kernel/pull_requests/metal-kernel-${{ matrix.kernel }}