2025-01-04 14:02:57 +01:00
|
|
|
name: Build dev on push
|
|
|
|
run-name: Build dev on push
|
2025-01-04 14:00:01 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2025-01-04 14:02:57 +01:00
|
|
|
- dev
|
2025-01-04 14:00:01 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-api:
|
|
|
|
runs-on: [runner]
|
2025-01-04 14:04:56 +01:00
|
|
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
2025-01-04 14:00:01 +01:00
|
|
|
steps:
|
|
|
|
- name: Clone Repository
|
|
|
|
uses: https://github.com/actions/checkout@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
- name: Build docker
|
|
|
|
run: |
|
2025-01-04 14:04:56 +01:00
|
|
|
docker build -t git.sh-edraft.de/sh-edraft.de/open-redirect-api-dev:$(cat version.txt) .
|
2025-01-04 14:00:01 +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: |
|
2025-01-04 14:04:56 +01:00
|
|
|
docker push git.sh-edraft.de/sh-edraft.de/open-redirect-api-dev:$(cat version.txt)
|
2025-01-04 14:00:01 +01:00
|
|
|
|
|
|
|
build-web:
|
|
|
|
runs-on: [runner]
|
2025-01-04 14:04:56 +01:00
|
|
|
container: git.sh-edraft.de/sh-edraft.de/act-runner:latest
|
2025-01-04 14:00:01 +01:00
|
|
|
steps:
|
|
|
|
- name: Clone Repository
|
|
|
|
uses: https://github.com/actions/checkout@v3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CI_ACCESS_TOKEN }}
|
|
|
|
|
|
|
|
- name: Prepare web build
|
|
|
|
run: |
|
|
|
|
npm ci
|
|
|
|
|
|
|
|
- name: Build web
|
|
|
|
run: |
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
- name: Build docker
|
|
|
|
run: |
|
2025-01-04 14:04:56 +01:00
|
|
|
docker build -t git.sh-edraft.de/sh-edraft.de/open-redirect-web:$(cat version.txt) .
|
2025-01-04 14:00:01 +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: |
|
2025-01-04 14:04:56 +01:00
|
|
|
docker push git.sh-edraft.de/sh-edraft.de/open-redirect-web:$(cat version.txt)
|