replaced .woodpecker.yml with forgejo workflow
This commit is contained in:
parent
03ab52f648
commit
8e00fd7a1e
2 changed files with 31 additions and 30 deletions
31
.forgejo/workflows/docker.yml
Normal file
31
.forgejo/workflows/docker.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: Build and Push Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
name: Build and Push Docker image
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Login to cr.sp-codes.de
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: cr.sp-codes.de
|
||||||
|
username: ${{ secrets.CR_USERNAME }}
|
||||||
|
password: ${{ secrets.CR_TOKEN }}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
spcodes/peertube:latest
|
||||||
|
cr.sp-codes.de/sp-codes/peertube:latest
|
|
@ -1,30 +0,0 @@
|
||||||
pipeline:
|
|
||||||
docker:
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
|
||||||
secrets:
|
|
||||||
- DOCKER_USERNAME
|
|
||||||
- DOCKER_PASSWORD
|
|
||||||
settings:
|
|
||||||
repo: spcodes/peertube
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
when:
|
|
||||||
branch: main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
cr:
|
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
|
||||||
secrets:
|
|
||||||
- source: CR_USERNAME
|
|
||||||
target: DOCKER_USERNAME
|
|
||||||
- source: CR_PASSWORD
|
|
||||||
target: DOCKER_PASSWORD
|
|
||||||
settings:
|
|
||||||
registry: cr.sp-codes.de
|
|
||||||
repo: cr.sp-codes.de/sp-codes/peertube
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
when:
|
|
||||||
branch: main
|
|
||||||
event:
|
|
||||||
- push
|
|
Loading…
Reference in a new issue