Use Gitea actions instead of woodpecker
Some checks failed
build

This commit is contained in:
Administrator 2023-03-27 16:32:04 +02:00
parent e5a8a00155
commit aa7ac84670
3 changed files with 41 additions and 51 deletions

View File

@ -0,0 +1,41 @@
name: Build & Publish
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: https://github.com/docker/metadata-action@v4
with:
images: git.flokaiser.com/dhbw/guesstheprice
tags: |
type=sha,enable=true,priority=100,prefix={{branch}}-,suffix=,format=short
type=raw,value=latest,enable={{is_default_branch}}
- name: Get get-docker.sh
run: curl -fsSL https://get.docker.com -o get-docker.sh
- name: Install docker
run: sh get-docker.sh
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: git.flokaiser.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./source/
platforms: linux/amd64
push: true
tags: ${{ steps.meta.outputs.tags }}

4
.re
View File

@ -1,4 +0,0 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"schedule": ["* 5 * * *"]
}

View File

@ -1,47 +0,0 @@
pipeline:
generate_docker_tag:
image: golang
commands:
- echo -n "${CI_COMMIT_BRANCH//\//-}-${CI_COMMIT_SHA:0:8}, latest" > .tags
when:
event: push
build:
image: woodpeckerci/plugin-docker-buildx
settings:
repo:
from_secret: repo
username:
from_secret: username
password:
from_secret: password
registry:
from_secret: registry
dockerfile: source/Dockerfile
platforms: linux/amd64
when:
event: push
deploy:
image: appleboy/drone-ssh
network_mode: host
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_user
password:
from_secret: ssh_password
port:
from_secret: ssh_port
script:
- cd ~/docker-compose-files/guess_the_price
- docker-compose pull
- docker-compose --env-file ~/docker-compose-env/guess_the_price.env up -d
when:
event: push
branches: main