Skip to content

small refactoring

small refactoring #81

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
tags: [ 'v*' ]
pull_request:
branches: [ "main" ]
jobs:
build_backend:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta # https://github.com/docker/metadata-action
id: meta
uses: docker/metadata-action@v5
with:
images: |
linea/tno
tags: |
type=semver,pattern={{version}},prefix=backend_
type=sha,format=short,prefix=backend_
flavor: |
latest=auto
prefix=backend_,onlatest=true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ./backend
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_frontend:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta # https://github.com/docker/metadata-action
id: meta
uses: docker/metadata-action@v5
with:
images: |
linea/tno
tags: |
type=semver,pattern={{version}},prefix=frontend_
type=sha,format=short,prefix=frontend_
flavor: |
latest=auto
prefix=frontend_,onlatest=true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ./frontend
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_predict_occultation:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta # https://github.com/docker/metadata-action
id: meta
uses: docker/metadata-action@v5
with:
images: |
linea/tno
tags: |
type=semver,pattern={{version}},prefix=predict_occ_
type=sha,format=short,prefix=predict_occ_
flavor: |
latest=auto
prefix=predict_occ_,onlatest=true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ./predict_occultation
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_pipelines:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Docker meta # https://github.com/docker/metadata-action
id: meta
uses: docker/metadata-action@v5
with:
images: |
linea/tno
tags: |
type=semver,pattern={{version}},prefix=pipelines_
type=sha,format=short,prefix=pipelines_
flavor: |
latest=auto
prefix=pipelines_,onlatest=true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
context: ./pipelines
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}