From 9048c9e6e776f9edfe2f3296e531298e3468500a Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:30:04 -0400 Subject: [PATCH 1/4] create experimental-binaries package on release --- .github/workflows/release.yaml | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000000..5e8ad2b019 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,52 @@ +name: Release Actions + +on: + release: + types: [published] + +jobs: + eb: + name: experimental-binaries + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + actions: read + steps: + - name: Create Dockerfile + run: | + cat < Dockerfile + FROM scratch + LABEL org.opencontainers.image.description="A collection of experimental Leap binary packages" + COPY *.deb / + EOF + - name: Get ubuntu20 leap-dev.deb + uses: AntelopeIO/asset-artifact-download-action@v3 + with: + owner: ${{github.repository_owner}} + repo: ${{github.event.repository.name}} + file: leap-dev.deb + target: ${{github.sha}} + artifact-name: leap-dev-ubuntu20-amd64 + wait-for-exact-target-workflow: true + - name: Get ubuntu22 leap-dev.deb + uses: AntelopeIO/asset-artifact-download-action@v3 + with: + owner: ${{github.repository_owner}} + repo: ${{github.event.repository.name}} + file: leap-dev.deb + target: ${{github.sha}} + artifact-name: leap-dev-ubuntu22-amd64 + wait-for-exact-target-workflow: true + - name: Login to ghcr + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.repository_owner}} + password: ${{github.token}} + - name: Build and push experimental-binaries + uses: docker/build-push-action@v3 + with: + push: true + tags: ghcr.io/${{github.repository_owner}}/experimental-binaries:${{github.ref_name}} + context: . From ce2b8eaa1fe45bfecc3ac0c3a70d43428b7434a4 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Wed, 18 Oct 2023 21:52:17 -0400 Subject: [PATCH 2/4] fix leap-dev.deb filename regex --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5e8ad2b019..55c3d9cb07 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -25,7 +25,7 @@ jobs: with: owner: ${{github.repository_owner}} repo: ${{github.event.repository.name}} - file: leap-dev.deb + file: 'leap-dev.*(x86_64|amd64).deb' target: ${{github.sha}} artifact-name: leap-dev-ubuntu20-amd64 wait-for-exact-target-workflow: true @@ -34,7 +34,7 @@ jobs: with: owner: ${{github.repository_owner}} repo: ${{github.event.repository.name}} - file: leap-dev.deb + file: 'leap-dev.*(x86_64|amd64).deb' target: ${{github.sha}} artifact-name: leap-dev-ubuntu22-amd64 wait-for-exact-target-workflow: true From df121a2e3f96aa431e166d6775bbe5d01a83b9e0 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:53:33 -0400 Subject: [PATCH 3/4] move Dockerfile creation step to after download of .deb files --- .github/workflows/release.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 55c3d9cb07..2b01a24740 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,13 +13,6 @@ jobs: packages: write actions: read steps: - - name: Create Dockerfile - run: | - cat < Dockerfile - FROM scratch - LABEL org.opencontainers.image.description="A collection of experimental Leap binary packages" - COPY *.deb / - EOF - name: Get ubuntu20 leap-dev.deb uses: AntelopeIO/asset-artifact-download-action@v3 with: @@ -38,6 +31,13 @@ jobs: target: ${{github.sha}} artifact-name: leap-dev-ubuntu22-amd64 wait-for-exact-target-workflow: true + - name: Create Dockerfile + run: | + cat < Dockerfile + FROM scratch + LABEL org.opencontainers.image.description="A collection of experimental Leap binary packages" + COPY *.deb / + EOF - name: Login to ghcr uses: docker/login-action@v3 with: From fcda655121cb5abe9ecc540c668602c9a94d51e2 Mon Sep 17 00:00:00 2001 From: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com> Date: Mon, 23 Oct 2023 09:54:27 -0400 Subject: [PATCH 4/4] remove unneeded (x86_64|amd64) since this will always be current version --- .github/workflows/release.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2b01a24740..dfcd19869d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,7 +18,7 @@ jobs: with: owner: ${{github.repository_owner}} repo: ${{github.event.repository.name}} - file: 'leap-dev.*(x86_64|amd64).deb' + file: 'leap-dev.*amd64.deb' target: ${{github.sha}} artifact-name: leap-dev-ubuntu20-amd64 wait-for-exact-target-workflow: true @@ -27,7 +27,7 @@ jobs: with: owner: ${{github.repository_owner}} repo: ${{github.event.repository.name}} - file: 'leap-dev.*(x86_64|amd64).deb' + file: 'leap-dev.*amd64.deb' target: ${{github.sha}} artifact-name: leap-dev-ubuntu22-amd64 wait-for-exact-target-workflow: true