code-server/.gitea/workflows/deploy.yaml
Sven Heidemann 68e0508d52
All checks were successful
Deploy on push / build (push) Successful in 10m20s
Deploy on push / on-push-deploy_sh-edraft (push) Successful in 29s
Changed runner
2024-06-25 17:55:42 +00:00

59 lines
1.7 KiB
YAML

name: Deploy on push
run-name: Deploy on push
on:
push:
branches:
- master
jobs:
build:
runs-on: [dobby.sh-edraft.de, ubuntu-latest]
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
- name: Build image
run: |
docker image prune -f
docker build -t git.sh-edraft.de/sh-edraft.de/code-server:latest .
- 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
on-push-deploy_sh-edraft:
needs: build
runs-on: [hugo.sh-edraft.de, ubuntu-latest]
container: catthehacker/ubuntu:act-latest
steps:
- name: Clone Repository
uses: https://github.com/actions/checkout@v3
with:
token: ${{ secrets.CI_ACCESS_TOKEN }}
submodules: true
- 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
variables: "{}"