From 9dce2c6c2d49f8cc0096ed5f0888ac8a37ce990e Mon Sep 17 00:00:00 2001 From: Joshua Rich Date: Thu, 25 Apr 2024 10:13:58 +1000 Subject: [PATCH] build(github): :recycle: build workflow clean-ups --- .github/workflows/build.yml | 18 +++++++++--------- .github/workflows/release-container.yml | 12 ++---------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8a21c3f11..9912414a0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Release +name: Build on: push: @@ -151,12 +151,12 @@ jobs: env: CGO_ENABLED: 1 MATRIX_ARCH: ${{ matrix.arch }} - # - name: Build with fyne-cross - # id: build_fyne_cross - # run: > - # fyne-cross linux -arch=${{ matrix.arch }} - # -icon internal/agent/ui/assets/logo-pretty.png - # -release + - name: Build with fyne-cross + id: build_fyne_cross + run: > + fyne-cross linux -arch=${{ matrix.arch }} + -icon internal/agent/ui/assets/logo-pretty.png + -release - name: Create packages id: nfpm_package run: | @@ -188,8 +188,8 @@ jobs: with: name: ${APPVERSION} path: | - dist/*.{rpm,deb,zst,sig} - fyne-cross/dist/linux-${{ matrix.arch }}/*.{tar.xz,sig} + dist + fyne-cross/dist/linux-${{ matrix.arch }} - name: Upload release artifacts id: upload_release if: ${{ steps.release_please.outputs.release_created }} diff --git a/.github/workflows/release-container.yml b/.github/workflows/release-container.yml index 1714c59f5..9256621fa 100644 --- a/.github/workflows/release-container.yml +++ b/.github/workflows/release-container.yml @@ -1,4 +1,4 @@ -name: Build a container +name: Build Container env: REGISTRY: ghcr.io @@ -24,12 +24,10 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install/Cache dependencies uses: awalsh128/cache-apt-pkgs-action@latest with: packages: qemu-user-static - - name: Get Docker metadata id: docker_metadata uses: docker/metadata-action@v5 @@ -46,14 +44,12 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}},enable=${{ !startsWith(github.ref, 'refs/tags/v0.') }} - - uses: cardinalby/git-get-release-action@v1 id: release_metadata env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: latest: true - - name: Build container image id: build_image uses: redhat-actions/buildah-build@v2 @@ -66,7 +62,6 @@ jobs: containerfiles: Dockerfile layers: false oci: true - - name: Push to Container Registry id: push_image uses: redhat-actions/push-to-registry@v2 @@ -76,8 +71,7 @@ jobs: password: ${{ env.REGISTRY_PASSWORD }} tags: ${{ steps.build_image.outputs.tags }} extra-args: | - --disable-content-trust - + --disable-content-trust - name: Login to Container Registry uses: redhat-actions/podman-login@v1 if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -85,13 +79,11 @@ jobs: registry: ${{ env.REGISTRY }} username: ${{ env.REGISTRY_USER }} password: ${{ env.REGISTRY_PASSWORD }} - - name: Check and install cosign uses: sigstore/cosign-installer@v3.5.0 if: github.event_name == 'push' && github.ref == 'refs/heads/main' with: cosign-release: 'v2.2.2' - - name: Sign image with a key if: github.event_name == 'push' && github.ref == 'refs/heads/main' env: