mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-24 20:41:31 +01:00
ci: switch to github actions
This commit is contained in:
parent
7f2fa528fe
commit
471fc948a8
31
.github/workflows/build_image.yml
vendored
Normal file
31
.github/workflows/build_image.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
name: Build Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "20 4 * * 6" # saturday at 4.20
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
FORCE_COLOR: "1"
|
||||
DOCKER_REGISTRY: registry.decapod.one
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to docker registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: registry.decapod.one
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
push: true
|
||||
tags: registry.decapod.one/brethil/dotfiles:latest
|
|
@ -1,32 +0,0 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: master
|
||||
|
||||
steps:
|
||||
build:
|
||||
name: build docker image
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
settings:
|
||||
repo: registry.decapod.one/brethil/dotfiles
|
||||
registry: registry.decapod.one
|
||||
auto_tag: true
|
||||
username:
|
||||
from_secret: registry_user
|
||||
password:
|
||||
from_secret: registry_token
|
||||
|
||||
notify:
|
||||
image: registry.decapod.one/toolchain:latest
|
||||
secrets: [bretellofier_token, bretellofier_recipients]
|
||||
commands:
|
||||
- bretellofier "[woodpecker] ✅ Succesfully built ${CI_REPO}"
|
||||
when:
|
||||
- status: [success]
|
||||
|
||||
notify-on-failure:
|
||||
image: registry.decapod.one/toolchain
|
||||
secrets: [bretellofier_token, bretellofier_recipients]
|
||||
when:
|
||||
- status: [failure]
|
||||
commands:
|
||||
- bretellofier "[woodpecker] 💥 $CI_REPO CI failed"
|
Loading…
Reference in New Issue
Block a user