Merge pull request #276 from UniversityOfHelsinkiCS/renovate/node-22.x #128
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: importer-db-api-staging | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- importer-db-api/** | |
- .github/workflows/importer-db-api-staging.yaml | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Login to toska Docker registry' | |
uses: docker/login-action@v3 | |
with: | |
registry: registry-toska.ext.ocp-prod-0.k8s.it.helsinki.fi | |
username: ${{ secrets.TOSKAREGISTRY_USERNAME }} | |
password: ${{ secrets.TOSKAREGISTRY_PASSWORD }} | |
- name: 'Run importer-db and importer-db-api' | |
run: docker compose --file docker-compose.ci.yml up --detach --quiet-pull | |
- name: 'Run unit tests' | |
run: docker compose --file docker-compose.ci.yml exec importer-db-api npm run test | |
- name: Install dependencies | |
run: npm ci && npm ci --prefix importer-db-api | |
- name: Lint files | |
run: npm run eslint -- importer-db-api | |
build-and-push: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build and push image | |
uses: ./.github/actions/build-and-push-image | |
with: | |
image: importer-db-api | |
tag: staging | |
password: ${{ secrets.QUAY_IO_TOKEN }} |