Move to woodpecker
All checks were successful
ci/woodpecker/manual/docker_dev Pipeline was successful

This commit is contained in:
SebClem 2024-01-01 14:46:05 +01:00
parent 0b6c402c9e
commit ec018d2fb5
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
6 changed files with 58 additions and 112 deletions

View File

@ -1,4 +0,0 @@
template: |
## Whats Changed
$CHANGES

View File

@ -1,41 +0,0 @@
name: Build Dev Docker
on:
push:
branches-ignore:
- "renovate/**"
tags-ignore:
- "**"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: 🛠️ Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: 🔒 Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🛠️ Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.4
- name: 🛠️ Set tag
run: |
echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
- name: 🔨 Build and push Docker
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: "ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }}"
file: ./Dockerfile

View File

@ -1,41 +0,0 @@
name: Build release Docker
on:
push:
tags:
- "**"
jobs:
build-docker:
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
- name: 🛠️ Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: 🔒 Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🛠️ Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.4
- name: 🛠️ Set tag
run: |
echo "tag=${{ steps.branch-name.outputs.current_branch }}" >> $GITHUB_ENV
- name: 🔨 Build and push Docker
uses: docker/build-push-action@v3
with:
push: true
context: .
tags: |
ghcr.io/sebclem/claptrapbot-ui:${{ env.tag }}
ghcr.io/sebclem/claptrapbot-ui:latest
file: ./Dockerfile

View File

@ -1,26 +0,0 @@
name: Release Drafter
on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
update_release_draft:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -0,0 +1,42 @@
when:
event:
- push
- pull_request
- manual
- tag
steps:
build-only:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
registry: git.sebclem.fr
dry_run: true
logins:
- registry: https://git.sebclem.fr
username:
from_secret: docker_user
password:
from_secret: docker_token
when:
branch: renovate/*
event: [push, pull_request, manual]
publish-dev:
image: woodpeckerci/plugin-docker-buildx
settings:
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
registry: git.sebclem.fr
tag: ${CI_COMMIT_BRANCH}
logins:
- registry: https://git.sebclem.fr
username:
from_secret: docker_user
password:
from_secret: docker_token
when:
branch:
exclude: renovate/*
event: [push, pull_request, manual]

16
.woodpecker/realease.yml Normal file
View File

@ -0,0 +1,16 @@
when:
event: tag
steps:
publish:
image: woodpeckerci/plugin-docker-buildx
settings:
platforms: linux/amd64
auto_tag: true
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
logins:
- registry: https://git.sebclem.fr
username:
from_secret: docker_user
password:
from_secret: docker_token