Skip to content

ARKIV-240 Config for Østfold #5

ARKIV-240 Config for Østfold

ARKIV-240 Config for Østfold #5

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Get repo name
id: get_repo
run: echo "REPO=${GITHUB_REPOSITORY#*/}" >> $GITHUB_OUTPUT
- name: Setup Java 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Gradle Setup
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
- name: Gradle build
run: |
./gradlew build
mkdir data
cp ./build/libs/${GITHUB_REPOSITORY#*/}*.jar ./data/app.jar
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: ${{steps.get_repo.outputs.REPO}}
path: ./data/app.jar
# - name: Trigger CD
# if: github.ref == 'refs/heads/main'
# uses: peter-evans/repository-dispatch@v2
# with:
# token: ${{ secrets.GITHUBACTION_TOKEN }}
# repository: ${{ github.repository }}
# event-type: trigger-cd