Skip to content

ci(mergify): upgrade configuration to current format #2184

ci(mergify): upgrade configuration to current format

ci(mergify): upgrade configuration to current format #2184

Workflow file for this run

name: For each commit and PR
on:
push:
branches:
- "*"
tags-ignore:
- "v*"
pull_request:
env:
REGISTRY: quay.io
IMAGE: quay.io/${{ github.repository }}
CGO_ENABLED: 0
GO_VERSION: "1.23"
jobs:
validation:
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Setup Dynamic Env
run: |
echo "MAKEFLAGS=-j$(nproc)" | tee $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
cache: true
- name: Fetch Deps
run: |
# fixes "write /run/user/1001/355792648: no space left on device" error
sudo mount -o remount,size=3G /run/user/1001 || true
go get -t ./... && go mod tidy
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate all files
run: make -j1 gen
- name: Run all the tests
run: make ci
- name: upload codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: compile binaries
run: make crosscompile
- name: Figure out Docker Tags
id: docker-image-tag
run: |
echo ::set-output name=tags::${{ env.IMAGE }}:latest,${{ env.IMAGE }}:sha-${GITHUB_SHA::8}
- name: Login to quay.io
uses: docker/login-action@v3
if: ${{ startsWith(github.ref, 'refs/heads/main') }}
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build Docker Images
uses: docker/build-push-action@v6
with:
context: ./
file: ./Dockerfile
cache-from: type=registry,ref=${{ env.IMAGE }}:latest
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker-image-tag.outputs.tags }}
# looks just like Build Docker Images except with push:true and this will only run for builds for main
- name: Push Docker Images
uses: docker/build-push-action@v6
if: ${{ startsWith(github.ref, 'refs/heads/main') }}
with:
context: ./
file: ./Dockerfile
cache-from: type=registry,ref=${{ env.IMAGE }}:latest
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.docker-image-tag.outputs.tags }}