code-server/.gitea/workflows/deploy.yaml

59 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2023-11-04 14:45:12 +01:00
name: Deploy on push
run-name: Deploy on push
on:
push:
branches:
- master
jobs:
2023-12-09 20:12:42 +01:00
build:
runs-on: [dobby.sh-edraft.de, ubuntu-latest]
2023-11-04 14:45:12 +01:00
container: catthehacker/ubuntu:act-latest
steps:
- name: Setup docker
uses: https://github.com/papodaca/install-docker-action@main
- run: docker -v
- name: Clone Repository
uses: https://github.com/actions/checkout@v3
with:
token: ${{ secrets.CI_ACCESS_TOKEN }}
submodules: true
2023-12-09 20:29:08 +01:00
- name: Build image
2023-11-04 14:45:12 +01:00
run: |
docker image prune -f
2023-12-09 20:12:42 +01:00
docker build -t git.sh-edraft.de/sh-edraft.de/code-server:latest .
2023-12-09 20:29:08 +01:00
- name: Login to registry git.sh-edraft.de
uses: https://github.com/docker/login-action@v1
with:
registry: git.sh-edraft.de
username: ${{ secrets.CI_USERNAME }}
password: ${{ secrets.CI_ACCESS_TOKEN }}
- name: Push image
run: docker push git.sh-edraft.de/sh-edraft.de/code-server:latest
2023-12-09 20:12:42 +01:00
on-push-deploy_sh-edraft:
needs: build
2024-06-25 19:55:42 +02:00
runs-on: [hugo.sh-edraft.de, ubuntu-latest]
2023-12-09 20:12:42 +01:00
container: catthehacker/ubuntu:act-latest
steps:
2023-12-09 20:23:30 +01:00
- name: Clone Repository
uses: https://github.com/actions/checkout@v3
with:
token: ${{ secrets.CI_ACCESS_TOKEN }}
submodules: true
2023-11-04 14:45:12 +01:00
- name: Deploy Stack to sh-edraft.de
uses: https://github.com/kgierke/portainer-stack-deployment@v1
with:
portainer-url: "https://docker.sh-edraft.de"
portainer-username: "gitea_job"
portainer-password: "${{ secrets.docker_job }}"
portainer-endpoint: 2
name: code
file: docker-compose.yml
2023-11-27 19:03:52 +01:00
variables: "{}"