Skip to content

Merge pull request #7 from navikt/dependabot/pip/pip-256b5382ac #31

Merge pull request #7 from navikt/dependabot/pip/pip-256b5382ac

Merge pull request #7 from navikt/dependabot/pip/pip-256b5382ac #31

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- main
jobs:
build_and_deploy:
name: Build, test, push and deploy
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest
- name: Push docker image to GAR
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: nais-analyse
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
- name: Deploy to NAIS
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: .nais/naisjob.yaml
VAR: image=${{ steps.docker-build-push.outputs.image }}