Skip to content

Deploy feature branch #15

Deploy feature branch

Deploy feature branch #15

name: Deploy feature branch
on:
workflow_dispatch:
concurrency:
group: deploy_feture_branch
cancel-in-progress: true
permissions:
packages: write
contents: write
env:
IMAGE_TAG: ${{ github.sha }}
IMAGE: ghcr.io/${{ github.repository }}/aktivitet-arena-acl
jobs:
test-build-and-push:
name: Test, build and push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
cache: 'maven'
- name: Build maven artifacts
run: mvn -B package
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.IMAGE }}:${{ env.IMAGE_TAG }}
deploy-dev:
name: Deploy to dev
needs: test-build-and-push
uses: ./.github/workflows/naisdeploy.yaml
with:
environment: dev
secrets:
nais-deploy-secret: ${{ secrets.NAIS_DEPLOY_APIKEY }}
github-token: ${{ secrets.GITHUB_TOKEN }}