This repository has been archived on 2024-10-10. You can view files and clone it, but cannot push or open issues or pull requests.
roundcube/.gitea/workflows/build.yaml

68 lines
1.5 KiB
YAML
Raw Permalink Normal View History

---
# generic
name: 'Build and Publish'
on:
push:
branches:
2024-07-25 09:33:17 +02:00
- 'main'
# build job
jobs:
2024-07-04 16:07:35 +02:00
# build container
Build:
runs-on: 'ubuntu-latest'
steps:
# checkout code
- name: 'Clone repo'
uses: 'actions/checkout@v4'
# login to cr.simoncor.net
- name: 'Login to cr.simoncor.net'
uses: 'docker/login-action@v3'
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@v6'
with:
context: '.'
file: 'Dockerfile.linux.amd64'
push: true
tags: |
cr.simoncor.net/siempie/roundcube:latest
cr.simoncor.net/siempie/roundcube:v1
# ansible deployment
2024-07-04 16:07:35 +02:00
Deployment:
runs-on: 'ubuntu-latest'
2024-10-07 11:36:58 +02:00
needs: 'Build'
steps:
# ansible deployment
- name: 'Ansible deployment'
uses: 'appleboy/ssh-action@v1.1.0'
with:
# bastion
2024-10-07 11:36:02 +02:00
proxy_host: 'bastion.siempie.com'
proxy_port: '22'
proxy_username: ${{ secrets.USERNAME }}
proxy_key: ${{ secrets.SSHKEY }}
# ansible management
host: 'ansible.siempie.internal'
port: '22'
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSHKEY }}
# command
script: |
2024-07-02 16:55:11 +02:00
sudo /usr/local/bin/ansible-playbook /etc/ansible/playbooks/production/roundcube.yaml