ioteer/.gitea/workflows/build-push.yaml

41 lines
995 B
YAML
Raw Normal View History

2023-11-08 06:50:57 +00:00
name: Build and Push Image
on: [ push ]
2023-11-08 06:46:55 +00:00
jobs:
2023-11-08 06:50:57 +00:00
build:
name: Build and push image
2023-11-08 06:46:55 +00:00
runs-on: ubuntu-latest
2023-11-12 19:21:00 +00:00
container: catthehacker/ubuntu:act-latest
2023-11-08 06:50:57 +00:00
2023-11-08 06:46:55 +00:00
steps:
2023-11-18 22:14:05 +00:00
- name: Checkout
uses: actions/checkout@v4
2023-11-08 06:50:57 +00:00
2023-11-18 21:52:35 +00:00
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
2023-11-18 21:53:12 +00:00
echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config
2023-11-18 21:52:35 +00:00
2023-11-14 20:49:39 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
2023-11-14 20:53:24 +00:00
with:
2023-11-18 21:40:13 +00:00
driver: kubernetes
driver-opts: |
namespace=act-runner
2023-11-18 22:03:21 +00:00
qemu.install=true
2023-11-08 06:50:57 +00:00
2023-11-14 20:49:39 +00:00
- name: Login to Docker Registry
uses: docker/login-action@v3
2023-11-08 06:50:57 +00:00
with:
2023-11-14 20:49:39 +00:00
registry: git.tbrnt.ch
2023-11-08 06:50:57 +00:00
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
2023-11-14 20:49:39 +00:00
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
2023-11-18 22:14:05 +00:00
platforms: linux/amd64,linux/arm64
2023-11-14 20:49:39 +00:00
tags: |
git.tbrnt.ch/tobru/ioteer:latest