Skip to content

Commit

Permalink
custom build stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiort committed Feb 29, 2024
1 parent 2edac54 commit 9999467
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 78 deletions.
76 changes: 0 additions & 76 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

72 changes: 72 additions & 0 deletions .github/workflows/docker-latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Docker Build and Push

Check failure on line 1 in .github/workflows/docker-latest.yaml

View workflow job for this annotation

GitHub Actions / build

.github/workflows/docker-latest.yaml#L1

This run was manually canceled.

on:
push:
branches: [ "main", build ]
paths-ignore:
- 'docs/**'

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
#IMAGE_NAME: ${{ github.repository }}


jobs:
build:

runs-on: actions-runner-kube-niggl
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64,amd64'

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: kubero-meta
uses: docker/metadata-action@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: ${{ env.REGISTRY }}/${{ github.repository }}/kubero
tags: |
latest
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: kubero-build-and-push
uses: docker/build-push-action@v5
with:
context: .
build-args: VERSION=${{github.ref_name}}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.kubero-meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
labels: ${{ steps.kubero-meta.outputs.labels }}
2 changes: 1 addition & 1 deletion .github/workflows/docker-prerelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
jobs:
build:

runs-on: ubuntu-latest
runs-on: actions-runner-kube-niggl
permissions:
contents: read
packages: write
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
jobs:
build:

runs-on: ubuntu-latest
runs-on: actions-runner-kube-niggl
permissions:
contents: read
packages: write
Expand Down

0 comments on commit 9999467

Please sign in to comment.