[ci] feat: migrated to gitea actions workflow
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
47b9984864
commit
67e3882e04
65
.gitea/workflow/build.yaml
Normal file
65
.gitea/workflow/build.yaml
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
# generic
|
||||||
|
name: 'Build and Publish'
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
# jobs
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
# build container
|
||||||
|
build:
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# checkout code
|
||||||
|
- name: 'Clone repo'
|
||||||
|
uses: 'actions/checkout@v2'
|
||||||
|
|
||||||
|
# login to cr.simoncor.net
|
||||||
|
- name: 'Login to cr.simoncor.net'
|
||||||
|
uses: 'docker/login-action@v2'
|
||||||
|
with:
|
||||||
|
registry: 'cr.simoncor.net'
|
||||||
|
username: ${{ vars.REGISTER_USERNAME }}
|
||||||
|
password: ${{ vars.REGISTER_PASSWORD }}
|
||||||
|
|
||||||
|
# build and publish container
|
||||||
|
- name: 'Build and Publish'
|
||||||
|
uses: 'docker/build-push-action@v3'
|
||||||
|
with:
|
||||||
|
context: '.'
|
||||||
|
file: 'Dockerfile.linux.amd64'
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
cr.simoncor.net/siempie/simoncor-net:latest
|
||||||
|
|
||||||
|
|
||||||
|
# kubernetes deployment
|
||||||
|
deployment:
|
||||||
|
runs-on: 'ubuntu-latest'
|
||||||
|
steps:
|
||||||
|
|
||||||
|
# name: Build
|
||||||
|
- name: 'Kubernetes rollout deployment'
|
||||||
|
uses: 'appleboy/ssh-action@v1.0.3'
|
||||||
|
with:
|
||||||
|
|
||||||
|
# bastionproxy_host: ${{ secrets.PROXY_HOST }}
|
||||||
|
proxy_host: 'siempie.com'
|
||||||
|
proxy_port: '22'
|
||||||
|
proxy_username: ${{ secrets.USERNAME }}
|
||||||
|
proxy_key: ${{ secrets.SSHKEY }}
|
||||||
|
|
||||||
|
# kubernetes management
|
||||||
|
host: 'k9s.siempie.internal'
|
||||||
|
port: '22'
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
key: ${{ secrets.SSHKEY }}
|
||||||
|
|
||||||
|
# command
|
||||||
|
script:
|
||||||
|
- 'kubectl -n simoncor-net rollout restart deployment simoncor-net'
|
Loading…
Reference in New Issue
Block a user