Add .forgejo/workflows/build.yaml
This commit is contained in:
parent
9d65f160c2
commit
f82e3c157e
1 changed files with 30 additions and 0 deletions
30
.forgejo/workflows/build.yaml
Normal file
30
.forgejo/workflows/build.yaml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
name: Build and Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download buildctl
|
||||
run: |
|
||||
curl -sSL https://github.com/moby/buildkit/releases/download/v0.15.0/buildkit-v0.15.0.linux-amd64.tar.gz | tar -xz -C /tmp
|
||||
chmod +x /tmp/bin/buildctl
|
||||
|
||||
- name: Build and push image
|
||||
run: |
|
||||
/tmp/bin/buildctl \
|
||||
--addr "$BUILDKIT_HOST" \
|
||||
--tlscacert /certs/ca.crt \
|
||||
--tlscert /certs/tls.crt \
|
||||
--tlskey /certs/tls.key \
|
||||
build \
|
||||
--frontend dockerfile.v0 \
|
||||
--local context=. \
|
||||
--local dockerfile=. \
|
||||
--output type=image,name=forgejo.monoloco.net/myers/test-build:latest,push=true
|
||||
Loading…
Reference in a new issue