Skip to content

Commit

Permalink
Added steps to download newly created linux boot files from artifact
Browse files Browse the repository at this point in the history
Signed-off-by: Jie Chen <[email protected]>
  • Loading branch information
jiechen0826 committed Jan 14, 2025
1 parent 9f3afd1 commit 1bb326a
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ env:
GOTESTSUM_CMD_RAW: "gotestsum --format standard-verbose --debug --raw-command -- go tool test2json -t"

jobs:
create-linux-bootfiles:
create-linux-boot-files:
runs-on: [self-hosted, 1ES.Pool=containerplat-github-runner-pool-east-us-2, 1ES.ImageOverride=github-mms-ubuntu-22]
name: Create Linux Bootfiles
permissions:
id-token: write # This is required for OIDC login (azure/login) to succeed
contents: read # This is required for actions/checkout to succeed
Expand All @@ -39,6 +38,45 @@ jobs:
- name: Show packages
run: find . -maxdepth 8 -ls

- name: Tar files to preserve file permissions
run: tar -cvf linux_bootfiles.tar ./LinuxBootFiles/

- name: Upload Linux boot files to artifact
uses: actions/upload-artifact@v4
with:
name: linux_bootfiles.tar
path: ./LinuxBootFiles/
if-no-files-found: error
overwrite: true
retention-days: 1

download-boot-files:
needs: create-linux-boot-files
runs-on: [self-hosted, 1ES.Pool=containerplat-github-runner-pool-east-us-2, 1ES.ImageOverride=github-mms-ws2022-containers-enabled]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false

- name: Create directory for boot files
shell: pwsh
run: mkdir -p ${{ github.workspace }}/LinuxBootFiles/

- name: Download boot files from artifact
uses: actions/download-artifact@v4
with:
name: linux_bootfiles.tar
path: ${{ github.workspace }}/LinuxBootFiles/

- name: Display downloaded linux boot files
shell: pwsh
run: |
Get-ChildItem -Recurse -Force -Path ${{ github.workspace }}/LinuxBootFiles/
tar.exe xf ${{ github.workspace }}/LinuxBootFiles/linux_bootfiles.tar -C ${{ github.workspace }}/LinuxBootFiles/
Get-ChildItem -Recurse -Force -Path ${{ github.workspace }}/LinuxBootFiles/
# Remove-Item -Path ${{ github.workspace }}/LinuxBootFiles/linux_bootfiles.tar -Force
lint:
runs-on: "windows-2022"
strategy:
Expand Down

0 comments on commit 1bb326a

Please sign in to comment.