Move docker to gitea actiob
This commit is contained in:
parent
8894670e8b
commit
38fd66430b
48
.gitea/workflows/docker.yml
Normal file
48
.gitea/workflows/docker.yml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
tags:
|
||||||
|
- "*"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
git.sebclem.fr/${{ gitea.repository }}
|
||||||
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
|
- name: Login to registry
|
||||||
|
if: "!startsWith('renovate/', github.ref_name)"
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.sebclem.fr
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: ${{ !startsWith('renovate/', github.ref_name) }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
@ -1,45 +1,45 @@
|
|||||||
when:
|
# when:
|
||||||
event:
|
# event:
|
||||||
- push
|
# - push
|
||||||
- manual
|
# - manual
|
||||||
|
|
||||||
steps:
|
# steps:
|
||||||
build-only:
|
# build-only:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
# image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
# settings:
|
||||||
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
# repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
||||||
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
# cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
||||||
registry: git.sebclem.fr
|
# registry: git.sebclem.fr
|
||||||
dry_run: true
|
# dry_run: true
|
||||||
logins:
|
# logins:
|
||||||
- registry: https://git.sebclem.fr
|
# - registry: https://git.sebclem.fr
|
||||||
username:
|
# username:
|
||||||
from_secret: docker_user
|
# from_secret: docker_user
|
||||||
password:
|
# password:
|
||||||
from_secret: docker_token
|
# from_secret: docker_token
|
||||||
when:
|
# when:
|
||||||
- event: push
|
# - event: push
|
||||||
branch: renovate/*
|
# branch: renovate/*
|
||||||
- event: manual
|
# - event: manual
|
||||||
branch: renovate/*
|
# branch: renovate/*
|
||||||
|
|
||||||
publish-dev:
|
# publish-dev:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
# image: woodpeckerci/plugin-docker-buildx
|
||||||
settings:
|
# settings:
|
||||||
repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
# repo: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
||||||
cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
# cache_from: git.sebclem.fr/sebclem/${CI_REPO_NAME,,}
|
||||||
registry: git.sebclem.fr
|
# registry: git.sebclem.fr
|
||||||
tag: ${CI_COMMIT_BRANCH}
|
# tag: ${CI_COMMIT_BRANCH}
|
||||||
logins:
|
# logins:
|
||||||
- registry: https://git.sebclem.fr
|
# - registry: https://git.sebclem.fr
|
||||||
username:
|
# username:
|
||||||
from_secret: docker_user
|
# from_secret: docker_user
|
||||||
password:
|
# password:
|
||||||
from_secret: docker_token
|
# from_secret: docker_token
|
||||||
when:
|
# when:
|
||||||
- event: push
|
# - event: push
|
||||||
branch:
|
# branch:
|
||||||
exclude: renovate/*
|
# exclude: renovate/*
|
||||||
- event: manual
|
# - event: manual
|
||||||
branch:
|
# branch:
|
||||||
exclude: renovate/*
|
# exclude: renovate/*
|
||||||
|
Loading…
Reference in New Issue
Block a user