Skip to content

Commit

Permalink
ci: init docker build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrssreal committed Dec 23, 2024
1 parent fb42711 commit 6850211
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# https://github.com/actions/runner/blob/fde5227fbfe9/.github/workflows/publish-image.yml

name: Build docker images

on:
workflow_dispatch:
push:
paths:
- "k8s/github-runners/runner-image/**"

env:
REGISTRY: ghcr.io

jobs:
build:
runs-on: ubuntu-24.04

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

- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3.8.0

- name: Login to ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push runner image
uses: docker/build-push-action@v6.10.0
with:
context: ./k8s/github-runners/runner-image
tags: |
${{ env.REGISTRY }}/${{ github.repository_owner }}/runner-image:${{ github.sha }}
${{ env.REGISTRY }}/${{ github.repository_owner }}/runner-image:latest
push: true

0 comments on commit 6850211

Please sign in to comment.