Bump com.pinterest:ktlint from 0.40.0 to 0.50.0 #930
Workflow file for this run
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: Build-Deploy-Preprod | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: | |
# build-deploy-prod deployer allerede til dev, dette førte til en race condition som stopper deploy til prod | |
- 'main' | |
env: | |
IMAGE: ghcr.io/${{ github.repository }}/familie-baks-soknad-api:${{ github.sha }} | |
jobs: | |
deploy-to-dev: | |
name: Bygg app/image, push til github, deploy til dev-gcp | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-cache-${{ hashFiles('pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven-cache- | |
- name: Bygg med maven + sonar | |
env: | |
SONAR_PROJECTKEY: ${{ secrets.SONAR_PROJECTKEY }} | |
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }} | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#run: mvn -B --no-transfer-progress package verify sonar:sonar --settings .m2/maven-settings.xml --file pom.xml | |
run: mvn -B --no-transfer-progress package --settings .m2/maven-settings.xml --file pom.xml | |
- name: Bygg Docker image | |
run: | | |
docker build -t $IMAGE . | |
- name: Login to Github Package Registry | |
env: | |
DOCKER_USERNAME: x-access-token | |
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin ghcr.io | |
- name: Push Docker image | |
run: docker push $IMAGE | |
- name: Deploy til dev-gcp | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: dev-gcp-teamfamilie.yaml |