Skip to content

Build, push and deploy to dev (manual) #4

Build, push and deploy to dev (manual)

Build, push and deploy to dev (manual) #4

Workflow file for this run

name: Build, push, and deploy to dev (manual)
on:
workflow_dispatch:
env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
PRINT_PAYLOAD: true
jobs:
build:
name: Test, build and push
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Docker build and push
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Docker Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build and push
uses: docker/build-push-action@v4
with:
context: .
tags: ${{ env.IMAGE }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
deploy-dev:
name: Deploy to dev
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/naisDev.yml