Skip to content

Building image

Building image #58

Workflow file for this run

name: Build Docker Image
run-name: Building image
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '*.md'
- 'README'
- 'LICENSE'
- 'DEPLOYMENT'
- 'Makefile'
- '.gitignore'
pull_request:
branches:
- main
paths-ignore:
- '*.md'
- 'README'
- 'LICENSE'
- 'DEPLOYMENT'
- 'Makefile'
- '.gitignore'
permissions:
contents: write
jobs:
linters:
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for vulnerabilities
run: |
docker run --entrypoint /bin/sh \
-v ./Pipfile:/app/Pipfile \
-v ./Pipfile.lock:/app/Pipfile.lock \
-v ./scripts/tests/vulnerabilities.sh:/vulnerabilities.sh \
python:3.12.2-alpine \
/vulnerabilities.sh
- name: Run pylint
run: |
make pylint_ci
- name: Run hadolint
run: |
make hadolint
tests:
needs: linters
defaults:
run:
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Python Tests
run: |
make tests_ci
- uses: irongut/[email protected]
name: Code Coverage Summary Report
with:
filename: artifacts/coverage.xml
fail_below_min: true
thresholds: '60 80'
update:
needs: tests
uses: Aridhia-Open-Source/pipelines/.github/workflows/build-docker.yml@main
with:
TAG: ${{ vars.VERSION }}
IMAGE: fn_task_controller
BUILD_PATH: .
HASH_SUFFIX: false
DOCKER_ACR: ${{ vars.DOCKER_ACR }}
secrets:
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
helm:
uses: Aridhia-Open-Source/pipelines/.github/workflows/helm-build.yml@main
needs: update
with:
VERSION: ${{ vars.VERSION }}
HELM_REPO: ${{ vars.HELM_REPO }}
USER_HELM: ${{ vars.USER_HELM }}
PATH_BUILD: k8s/fn-task-controller
CHART_NAME: fn-task-controller
secrets:
HELM_TOKEN: ${{ secrets.HELM_TOKEN }}