This commit is contained in:
maximo tejeda 2024-02-08 18:04:52 -04:00
parent 9b28afcf91
commit 5c097be671

View File

@ -4,34 +4,25 @@ on:
push:
branches:
- master
jobs:
build:
name: Build and push image
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
runs-on: cth-ubuntu-latest
needs: build
if: gitea.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config
- name: chekcout
uses: https://github.com/actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: https://github.com/docker/setup-buildx-action@v3
with:
driver: kubernetes
driver-opts: |
namespace=act-runner
qemu.install=true
- name: Build and push
uses: docker/build-push-action@v5
config-inline: |
[registry."192.168.0.151:32000"]
http = true
insecure = true
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/arm64
tags: |
localhost:32000/scrapper:latest
tags: "192.168.0.151:32000/crawler:${{gitea.sha}},192.168.0.151:32000/crawler:latest"