Skip to content

Commit

Permalink
Update actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 committed Feb 26, 2024
1 parent e187600 commit cb92c19
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:
jobs:

build:

runs-on: ubuntu-22.04

strategy:
matrix:
kernel: ["6.6.18"]
Expand Down Expand Up @@ -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 }}
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
jobs:
build:
runs-on: ubuntu-22.04

strategy:
matrix:
kernel: ["6.6.18"]
Expand All @@ -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: |
Expand All @@ -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 }}

0 comments on commit cb92c19

Please sign in to comment.