From 474b5b7589e4904e846dc7121098064f256c7b56 Mon Sep 17 00:00:00 2001 From: Thomas Brugman <145768128+Githubguy132010@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:39:03 +0100 Subject: [PATCH 1/2] Update build.yml to optimize Workflow. --- .github/workflows/build.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d0b77d8f..de0cbbd85 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,9 +16,17 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 + - uses: actions/cache@v3 + with: + path: pacman-cache + key: ${{ runner.os }}-pacman-cache + - name: Set up Arch Linux Container run: | - docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity + docker run --privileged --name arch-container -d \ + -v ${{ github.workspace }}:/workdir \ + -v pacman-cache:/var/cache/pacman/pkg \ + archlinux:latest sleep infinity - name: Build ISO in Arch Container run: | @@ -66,14 +74,15 @@ jobs: # Upload the ISO to the GitHub release with a specific, predictable name - name: Upload ISO to GitHub Release - uses: actions/upload-release-asset@v1 + uses: softprops/action-gh-release@v1 + with: + files: ${{ github.workspace }}/Arch.iso + tag_name: v${{ github.run_id }}-release + name: "Arch Linux Release" + body: | + This release contains the Arch Linux ISO built on ${{ steps.date.outputs.date }}. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ github.workspace }}/Arch.iso - asset_name: Arch.iso - asset_content_type: application/octet-stream - name: Clean Up run: | From 6d1134afc084a199356685726107d0d0d0812a1b Mon Sep 17 00:00:00 2001 From: Thomas Brugman <145768128+Githubguy132010@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:57:12 +0000 Subject: [PATCH 2/2] Remove pacman cache --- .github/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de0cbbd85..7781f0869 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,8 +25,7 @@ jobs: run: | docker run --privileged --name arch-container -d \ -v ${{ github.workspace }}:/workdir \ - -v pacman-cache:/var/cache/pacman/pkg \ - archlinux:latest sleep infinity + -v archlinux:latest sleep infinity - name: Build ISO in Arch Container run: |