Add Forgejo Actions workflow to build and push image
Some checks failed
Build and push container image / build-and-push (push) Failing after 0s
Some checks failed
Build and push container image / build-and-push (push) Failing after 0s
This commit is contained in:
parent
434adf1f66
commit
0b5634333b
1 changed files with 36 additions and 0 deletions
36
.forgejo/workflows/build.yml
Normal file
36
.forgejo/workflows/build.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
name: Build and push container image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
IMAGE: git.workaround.org/chaas/vector-search
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Forgejo registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.workaround.org
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.FORGEJO_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
build-args: |
|
||||
SOURCE_COMMIT=${{ github.sha }}
|
||||
tags: |
|
||||
${{ env.IMAGE }}:latest
|
||||
${{ env.IMAGE }}:${{ github.sha }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue