Skip to content

Commit

Permalink
build(github): ♻️ build workflow clean-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Apr 25, 2024
1 parent 186c9de commit 9dce2c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Release
name: Build

on:
push:
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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 }}
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/release-container.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build a container
name: Build Container

env:
REGISTRY: ghcr.io
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -76,22 +71,19 @@ 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'
with:
registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}

- name: Check and install cosign
uses: sigstore/[email protected]
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:
Expand Down

0 comments on commit 9dce2c6

Please sign in to comment.