Skip to content

Bump the prod-dependencies group with 4 updates #69

Bump the prod-dependencies group with 4 updates

Bump the prod-dependencies group with 4 updates #69

Workflow file for this run

name: Build Main
on:
push:
branches: [ main, ghactions ]
env:
IMAGE_NAME: preflight-trigger
jobs:
build-main:
name: Build and push main snapshot images
strategy:
matrix:
architecture: [amd64]
platform: [linux]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
# Get tags and all history in order to find latest tag in later step
fetch-depth: 0
fetch-tags: true
- name: Set Env Tags
run: echo "RELEASE_TAG=$(git describe --abbrev=0 --tags)" >> "${GITHUB_ENV}"
- name: set short sha
run: echo SHA_SHORT=$(git rev-parse --short HEAD) >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ secrets.IMAGE_REGISTRY }}/${{ env.IMAGE_NAME }}
# TODO: If we end up releasing for other architectures we'll need the below
# tags: ${{ env.SHA_SHORT }}-${{ matrix.platform }}-${{ matrix.architecture }}
tags: ${{ env.SHA_SHORT }}
archs: ${{ matrix.architecture }}
build-args: |
quay_expiration=1w
release_tag=${{ env.RELEASE_TAG }}+${{ github.sha }}
ARCH=${{ matrix.architecture }}
dockerfiles: |
./Dockerfile
- name: Push Image
id: push-image
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
# TODO: If we end up releasing for other architectures we'll need the below
# tags: ${{ env.SHA_SHORT }}-${{ matrix.platform }}-${{ matrix.architecture }}
tags: ${{ env.SHA_SHORT }}
registry: ${{ secrets.IMAGE_REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-image.outputs.registry-paths }}"
outputs:
imageName: ${{ env.IMAGE_NAME }}
imageVersion: ${{ env.SHA_SHORT }}
build-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install system deps
run: 'sudo apt update && sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev'
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Tidy
run: make tidy
- name: Vet
run: make vet
- name: Format
run: make fmt
- name: Test
run: make cover