Skip to content

Merge pull request #184 from jdi-testing/issue_183-ci-workflows-update #1

Merge pull request #184 from jdi-testing/issue_183-ci-workflows-update

Merge pull request #184 from jdi-testing/issue_183-ci-workflows-update #1

Workflow file for this run

name: JDI QASP dev build workflow
on:
push:
branches:
- develop
jobs:
version-update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Increment version
run: |
cd model/version
OLD_VERSION=$(ls)
FIRST_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 1)
SECOND_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 2)
THIRD_DIGIT=$(echo $OLD_VERSION | cut -d '.' -f 3)
NEW_THIRD_DIGIT=$((THIRD_DIGIT+1))
NEW_VERSION=$FIRST_DIGIT.$SECOND_DIGIT.$NEW_THIRD_DIGIT
mv ./$OLD_VERSION ./$NEW_VERSION
cd ../..
- name: Commit incremented version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Increment version
branch: develop
lint:
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-compose.dev.yaml
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: false
- name: Lint
run: docker compose run api make lint
build:
needs: [version-update, lint]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up default environment
run: cp .env.dist .env
- name: Build Docker image
uses: ./.github/workflows/docker-image-update.yml