Add Gitea Actions workflow for building and pushing Docker image
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled
Some checks failed
Build and Push to Harbor / build-and-push (push) Has been cancelled
This commit is contained in:
36
.gitea/workflows/build-and-push.yaml
Normal file
36
.gitea/workflows/build-and-push.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Build and Push to Harbor
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Harbor
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: images.caffeinetux.com
|
||||
username: admin
|
||||
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./htlm
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
tags: |
|
||||
images.caffeinetux.com/apps/neon-vortex:latest
|
||||
images.caffeinetux.com/apps/neon-vortex:${{ github.sha }}
|
||||
cache-from: type=registry,ref=images.caffeinetux.com/apps/neon-vortex:buildcache
|
||||
cache-to: type=registry,ref=images.caffeinetux.com/apps/neon-vortex:buildcache,mode=max
|
||||
Reference in New Issue
Block a user