This commit is contained in:
@@ -1,26 +1,36 @@
|
|||||||
name: Build and Push Docker Image
|
name: Build and Push Image
|
||||||
on:
|
on: [push]
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: catthehacker/ubuntu:act-latest
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to gitea
|
- name: Set up Docker Buildx
|
||||||
run: NODE_NO_WARNINGS=1 docker login -u make -p ${{ secrets.TOKEN }} http://gitea-http.gitea.svc.cluster.local:3000
|
|
||||||
|
|
||||||
- name: Set up Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver: kubernetes
|
||||||
|
driver-opts: |
|
||||||
|
namespace=act-runner
|
||||||
|
qemu.install=true
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Login to Gitea Registry
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: http://gitea-http.gitea:3000 # Replace with your Gitea instance URL
|
||||||
|
username: make
|
||||||
|
password: ${{ secrets.TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and Push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: make/birdspotter:latest
|
platforms: linux/amd64,linux/arm64
|
||||||
platforms: linux/amd64,linux/arm64
|
tags: |
|
||||||
|
http://gitea-http.gitea:3000/make/your-repo:latest
|
||||||
|
http://gitea-http.gitea:3000/make/your-repo:${{ github.sha }}
|
||||||
Reference in New Issue
Block a user