All checks were successful
Build docker container / Build image (push) Successful in 1m37s
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
name: Build docker container
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: Build image
|
|
runs-on: ubuntu-latest
|
|
# container: ghcr.io/catthehacker/ubuntu:act-latest
|
|
env:
|
|
IMAGE_NAME: custom_act_runner
|
|
REGISTRY: git.ties.one
|
|
REPO_OWNER: public
|
|
KUBERNETES_MASTER: 10.43.0.1
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: https://git.ties.one
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- name: Set up Kubernetes config
|
|
run: |
|
|
mkdir -p ~/.kube
|
|
echo "${{ secrets.KUBE_CONFIG_CONTENT }}" > ~/.kube/config
|
|
chmod 600 ~/.kube/config
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
with:
|
|
driver: kubernetes
|
|
driver-opts: |
|
|
namespace=git
|
|
- name: Build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: >
|
|
${{ env.REGISTRY }}/${{ env.REPO_OWNER }}/${{ env.IMAGE_NAME }}:latest |