mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-22 14:54:22 +00:00
🔧 Conditionally run GitHub Actions workflows
This commit is contained in:
parent
301907e6b3
commit
dd2d3faf06
5 changed files with 76 additions and 53 deletions
19
.github/workflows/build-docker-backend.yml
vendored
Normal file
19
.github/workflows/build-docker-backend.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Build backend image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "/backend"
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: "Build backend image"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "Login to GitHub Containers"
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
||||||
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-backend:latest`"
|
||||||
|
run: docker build ./backend --tag ghcr.io/steffo99/sophon-backend:latest
|
||||||
|
- name: "Upload the container to GitHub Containers"
|
||||||
|
run: docker push ghcr.io/steffo99/sophon-backend:latest
|
19
.github/workflows/build-docker-frontend.yml
vendored
Normal file
19
.github/workflows/build-docker-frontend.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Build frontend image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "/frontend"
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: "Build frontend image"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "Login to GitHub Containers"
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
||||||
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-frontend:latest`"
|
||||||
|
run: docker build ./frontend --tag ghcr.io/steffo99/sophon-frontend:latest
|
||||||
|
- name: "Upload the container to GitHub Containers"
|
||||||
|
run: docker push ghcr.io/steffo99/sophon-frontend:latest
|
53
.github/workflows/build-docker-images.yml
vendored
53
.github/workflows/build-docker-images.yml
vendored
|
@ -1,53 +0,0 @@
|
||||||
name: Build docker images
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
jobs:
|
|
||||||
build-backend:
|
|
||||||
name: "Build backend image"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Checkout repository"
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: "Login to GitHub Containers"
|
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
||||||
- name: "Build the docker container `ghcr.io/steffo99/sophon-backend:latest`"
|
|
||||||
run: docker build ./backend --tag ghcr.io/steffo99/sophon-backend:latest
|
|
||||||
- name: "Upload the container to GitHub Containers"
|
|
||||||
run: docker push ghcr.io/steffo99/sophon-backend:latest
|
|
||||||
build-frontend:
|
|
||||||
name: "Build frontend image"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Checkout repository"
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: "Login to GitHub Containers"
|
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
||||||
- name: "Build the docker container `ghcr.io/steffo99/sophon-frontend:latest`"
|
|
||||||
run: docker build ./frontend --tag ghcr.io/steffo99/sophon-frontend:latest
|
|
||||||
- name: "Upload the container to GitHub Containers"
|
|
||||||
run: docker push ghcr.io/steffo99/sophon-frontend:latest
|
|
||||||
build-proxy:
|
|
||||||
name: "Build proxy image"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Checkout repository"
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: "Login to GitHub Containers"
|
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
||||||
- name: "Build the docker container `ghcr.io/steffo99/sophon-proxy:latest`"
|
|
||||||
run: docker build ./proxy --tag ghcr.io/steffo99/sophon-proxy:latest
|
|
||||||
- name: "Upload the container to GitHub Containers"
|
|
||||||
run: docker push ghcr.io/steffo99/sophon-proxy:latest
|
|
||||||
build-jupyter:
|
|
||||||
name: "Build jupyter image"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: "Checkout repository"
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: "Login to GitHub Containers"
|
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
|
||||||
- name: "Build the docker container `ghcr.io/steffo99/sophon-jupyter:latest`"
|
|
||||||
run: docker build ./jupyter --tag ghcr.io/steffo99/sophon-jupyter:latest
|
|
||||||
- name: "Upload the container to GitHub Containers"
|
|
||||||
run: docker push ghcr.io/steffo99/sophon-jupyter:latest
|
|
19
.github/workflows/build-docker-jupyter.yml
vendored
Normal file
19
.github/workflows/build-docker-jupyter.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Build jupyter image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "/jupyter"
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: "Build jupyter image"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "Login to GitHub Containers"
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
||||||
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-jupyter:latest`"
|
||||||
|
run: docker build ./jupyter --tag ghcr.io/steffo99/sophon-jupyter:latest
|
||||||
|
- name: "Upload the container to GitHub Containers"
|
||||||
|
run: docker push ghcr.io/steffo99/sophon-jupyter:latest
|
19
.github/workflows/build-docker-proxy.yml
vendored
Normal file
19
.github/workflows/build-docker-proxy.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Build proxy image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
paths:
|
||||||
|
- "/proxy"
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: "Build proxy image"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: "Checkout repository"
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: "Login to GitHub Containers"
|
||||||
|
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u Steffo99 --password-stdin
|
||||||
|
- name: "Build the docker container `ghcr.io/steffo99/sophon-proxy:latest`"
|
||||||
|
run: docker build ./proxy --tag ghcr.io/steffo99/sophon-proxy:latest
|
||||||
|
- name: "Upload the container to GitHub Containers"
|
||||||
|
run: docker push ghcr.io/steffo99/sophon-proxy:latest
|
Loading…
Reference in a new issue