2023-11-06 21:10:38 +01:00
|
|
|
name: Deploy on push
|
|
|
|
run-name: Deploy on push
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2023-12-09 20:05:34 +01:00
|
|
|
build:
|
2023-12-09 14:33:51 +01:00
|
|
|
runs-on: [dobby.sh-edraft.de, ubuntu-latest]
|
|
|
|
container: catthehacker/ubuntu:act-latest
|
|
|
|
steps:
|
2023-12-09 20:05:34 +01:00
|
|
|
- name: Setup docker
|
|
|
|
uses: https://github.com/papodaca/install-docker-action@main
|
|
|
|
- run: docker -v
|
2023-12-09 14:33:51 +01:00
|
|
|
|
|
|
|
- name: Clone Repository
|
|
|
|
uses: https://github.com/actions/checkout@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
|
|
|
submodules: true
|
|
|
|
|
2023-12-09 20:05:34 +01:00
|
|
|
- name: Build act-runner image
|
|
|
|
run: |
|
|
|
|
docker image prune -f
|
|
|
|
docker build -t git.sh-edraft.de/sh-edraft.de/act-runner:latest .
|
|
|
|
|
|
|
|
on-push-deploy_sh-edraft:
|
|
|
|
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
|
|
|
|
|
2023-12-09 14:56:06 +01:00
|
|
|
- name: Login to registry git.sh-edraft.de
|
|
|
|
uses: https://github.com/docker/login-action@v1
|
2023-12-09 14:33:51 +01:00
|
|
|
with:
|
2023-12-09 14:56:06 +01:00
|
|
|
registry: git.sh-edraft.de
|
|
|
|
username: ${{ secrets.CI_USERNAME }}
|
|
|
|
password: ${{ secrets.CI_ACCESS_TOKEN }}
|
2023-12-09 14:33:51 +01:00
|
|
|
|
2023-12-09 20:05:34 +01:00
|
|
|
- name: Push image
|
|
|
|
run: docker push git.sh-edraft.de/sh-edraft.de/act-runner:latest
|