Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
5fe4691625
commit
13a48ed166
2 changed files with 36 additions and 14 deletions
36
.forgejo/workflows/build-push.yml
Normal file
36
.forgejo/workflows/build-push.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: Build & Push
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: slave
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Startup DIND
|
||||||
|
run: |
|
||||||
|
env
|
||||||
|
/dockerd-entrypoint.sh &
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Login to Docker Registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: git.ptr.moe
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build Image
|
||||||
|
run: make build-image
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Push Image
|
||||||
|
run: |
|
||||||
|
docker tag traefik/traefik git.ptr.moe/baalajimaestro/traefik:latest
|
||||||
|
docker push git.ptr.moe/baalajimaestro/traefik:latest
|
||||||
|
shell: bash
|
|
@ -1,14 +0,0 @@
|
||||||
when:
|
|
||||||
- event: push
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Build & Push
|
|
||||||
image: git.ptr.moe/baalajimaestro/build-runner
|
|
||||||
commands:
|
|
||||||
- /dockerd-entrypoint.sh dockerd 2&> /dev/null &
|
|
||||||
- echo $DOCKER_PASSWORD | docker login git.ptr.moe --username ${CI_REPO_OWNER} --password-stdin
|
|
||||||
- make build-image
|
|
||||||
- docker tag traefik/traefik git.ptr.moe/baalajimaestro/traefik:latest
|
|
||||||
- docker push git.ptr.moe/baalajimaestro/traefik:latest
|
|
||||||
secrets: [ docker_password ]
|
|
||||||
privileged: true
|
|
Loading…
Reference in a new issue