Migrate to woodpecker

This commit is contained in:
2026-04-17 02:39:08 +01:00
parent 79acc12e4f
commit 0e209bf5ed
2 changed files with 25 additions and 73 deletions

View File

@@ -1,73 +0,0 @@
name: Build Blog
on:
push:
branches:
- main # Set a branch to deploy
pull_request:
env:
IMAGE_REGISTRY: ghcr.io
IMAGE_OWNER: fluttershub
IMAGE_NAME: blog
jobs:
Build_Image:
runs-on: ubuntu-latest
# If running with act, Uncomment below
# container: phaze9/action-runner
env:
DOCKER_CONFIG: $HOME/.docker
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.IMAGE_OWNER }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push multi-arch image
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
labels: org.opencontainers.image.source=https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:latest
# Build_ARM64:
# runs-on: [self-hosted, linux, ARM64]
# # If running with act, Uncomment below
# # container: phaze9/action-runner
# env:
# DOCKER_CONFIG: $HOME/.docker
# steps:
# - uses: actions/checkout@v3
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@v1
# - name: Login to ghcr.io
# uses: docker/login-action@v1
# with:
# registry: ${{ env.IMAGE_REGISTRY }}
# username: ${{ env.IMAGE_OWNER }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and push
# id: docker_build_arm64
# uses: docker/build-push-action@v2
# with:
# push: true
# platforms: linux/arm64
# labels: org.opencontainers.image.source https://github.com/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}
# tags: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_OWNER }}/${{ env.IMAGE_NAME }}:arm64-latest

25
.woodpecker/build.yaml Normal file
View File

@@ -0,0 +1,25 @@
when:
- event: push
branch: main
clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 1
lfs: false
steps:
- name: build docker image
image: woodpeckerci/plugin-docker-buildx
settings:
repo: hotarublaze/blog
registry: gitea.infernonode.com
tags: latest
username:
from_secret: docker_woodpecker_username
password:
from_secret: docker_woodpecker_pat
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push