Fixed deployment problems?
Some checks failed
Build code-server / build-image (push) Failing after 21s

This commit is contained in:
Sven Heidemann 2023-11-27 18:03:39 +01:00
parent 76be6fe9b2
commit f1cb6aee19
2 changed files with 39 additions and 27 deletions

View File

@ -0,0 +1,30 @@
name: Build code-server
run-name: Build code-server
on:
push:
branches:
- master
jobs:
build-image:
runs-on: [gismo.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: Shutdown stack
run: docker stack rm code
- name: Build code-server image
run: |
docker image prune -f
chmod +x build
./build

View File

@ -1,34 +1,16 @@
name: Deploy on push name: Deploy code-server
run-name: Deploy on push run-name: Deploy code-server
on: on:
push: workflow_run:
branches: workflows: ["Build code-server"]
- master types:
- completed
jobs: jobs:
on-push-deploy_sh-edraft: deploy-stack:
runs-on: [gismo.sh-edraft.de, ubuntu-latest] runs-on: [dobby.sh-edraft.de, ubuntu-latest]
container: catthehacker/ubuntu:act-latest container: catthehacker/ubuntu:act-latest
steps: 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: Shutdown stack
run: docker stack rm code
- name: Build code-server image
run: |
docker image prune -f
chmod +x build
./build
- name: Deploy Stack to sh-edraft.de - name: Deploy Stack to sh-edraft.de
uses: https://github.com/kgierke/portainer-stack-deployment@v1 uses: https://github.com/kgierke/portainer-stack-deployment@v1
with: with:
@ -38,4 +20,4 @@ jobs:
portainer-endpoint: 2 portainer-endpoint: 2
name: code name: code
file: docker-compose.yml file: docker-compose.yml
variables: '{}' variables: "{}"