Migrate to woodpecker
This commit is contained in:
73
.github/workflows/release.yml
vendored
73
.github/workflows/release.yml
vendored
@@ -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
25
.woodpecker/build.yaml
Normal 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
|
||||||
Reference in New Issue
Block a user