Compare commits
34 Commits
main
...
209d6cdef8
| Author | SHA1 | Date | |
|---|---|---|---|
| 209d6cdef8 | |||
| 54a88d57d6 | |||
| 6e413a38e4 | |||
| 9917a6047b | |||
| a6f978e9ed | |||
| d4e7743744 | |||
| 6b22740920 | |||
| 9ad20b3059 | |||
| f24c5253a8 | |||
| e824176346 | |||
| c48121efcb | |||
| 3412d9d9d1 | |||
| 68213c8f72 | |||
| 4122eb7e84 | |||
| 2ba7c636df | |||
| c14947b9c0 | |||
| 57541edbf3 | |||
| 7fdec78220 | |||
| 4d61c6e05a | |||
| 1ea13d8fef | |||
| 4685c41d1d | |||
| 4301aa3625 | |||
| 8af45a4f9a | |||
| 173b235c83 | |||
| b1ecf478d8 | |||
| a1370fc79d | |||
| dfec061cd9 | |||
| ef75abf497 | |||
| 3eb8ace219 | |||
| be722ddcbd | |||
| f672c71a68 | |||
| 8b13274bf2 | |||
| 204c04736b | |||
| 518247d06f |
47
.gitea/actions/buildkit-build-push/action.yaml
Normal file
47
.gitea/actions/buildkit-build-push/action.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
name: BuildKit Build and Deploys
|
||||
description: "Build and deploy images"
|
||||
|
||||
inputs:
|
||||
registry_addr:
|
||||
description: ""
|
||||
required: true
|
||||
registry_username:
|
||||
description: ""
|
||||
required: true
|
||||
registry_password:
|
||||
description: ""
|
||||
required: true
|
||||
buildkit_addr:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
name:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
context:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
dockerfile:
|
||||
description: ""
|
||||
required: true
|
||||
default: "false"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Authenticate to Gitea registry
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.docker
|
||||
AUTH=$(printf "%s" "${{ inputs.registry_username }}:${{ inputs.registry_password }}" | base64 -w 0)
|
||||
printf '{"auths":{"${{ inputs.registry_addr }}":{"auth":"%s"}}}' "$AUTH" > ~/.docker/config.json
|
||||
|
||||
buildctl \
|
||||
--addr ${{ inputs.buildkit_addr }} \
|
||||
build \
|
||||
--frontend=dockerfile.v0 \
|
||||
--local context=${{ inputs.context }} \
|
||||
--local dockerfile=${{ inputs.dockerfile }} \
|
||||
--opt filename=Dockerfile \
|
||||
--output type=image,name=${{ inputs.tags }},push=true
|
||||
@@ -5,29 +5,25 @@ on:
|
||||
- ".gitea/**"
|
||||
- "pbsclient/**"
|
||||
schedule:
|
||||
- cron: "0 16 * * Sun"
|
||||
- cron: "0 16 * * Sun"
|
||||
|
||||
jobs:
|
||||
|
||||
build-docker-image:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
build-image:
|
||||
runs-on: oci-image-builder
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Build and Push Image
|
||||
uses: ./.gitea/actions/buildkit-build-push
|
||||
with:
|
||||
registry_addr: git.limbosolutions.com
|
||||
registry_username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
|
||||
registry_password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
|
||||
buildkit_addr: tcp://buildkitd.buildkit.svc.cluster.local:1234
|
||||
context: ./pbsclient
|
||||
dockerfile: ./pbsclient/docker
|
||||
name: git.limbosolutions.com/kb/pbsclient:latest
|
||||
|
||||
- name: Log in to git.limbosolutions.com docker registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.limbosolutions.com
|
||||
username: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.GITLIMBO_DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push Docker images
|
||||
id: push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ${{gitea.workspace}}/pbsclient
|
||||
file: ${{gitea.workspace}}/pbsclient/docker/Dockerfile
|
||||
push: true
|
||||
tags: git.limbosolutions.com/kb/pbsclient
|
||||
Reference in New Issue
Block a user