Skip to content

add Dockerfile and build in ci-pipeline #21

add Dockerfile and build in ci-pipeline

add Dockerfile and build in ci-pipeline #21

Workflow file for this run

name: CI Pipeline
on:
pull_request:
types: [opened, synchronize]
push:
branches: [main]
jobs:
code-quality:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
pip install --upgrade pip pylint
pip install .[dev]
- name: check black formating
run: |
black --check --diff --config ./pyproject.toml .
- name: lint changed and added files
run: |
pylint --rcfile=.pylintrc --fail-under 9 shiny_invoice/
build-container:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Log in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Image & Version String
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/shiny_invoice
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
- name: Build images
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |

Check failure on line 62 in .github/workflows/ci-pipeline.yml

View workflow run for this annotation

GitHub Actions / CI Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/ci-pipeline.yml (Line: 62, Col: 17): Unrecognized named-value: 'IMAGE_ID'. Located at position 1 within expression: IMAGE_ID
${{ IMAGE_ID }}:${{ VERSION }}
${{ IMAGE_ID }}:latest