ci: add idportenclient resource and use its secret #561
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: Test and build branch | |
on: | |
push | |
jobs: | |
build-branch: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: read | |
steps: | |
- name: Sjekk ut koden | |
uses: actions/checkout@v4 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Setup Gradle | |
if: github.ref_name != 'master' | |
uses: gradle/gradle-build-action@v3 | |
- name: Setup Gradle with dependency generation | |
if: github.ref_name == 'master' | |
uses: gradle/gradle-build-action@v3 | |
with: | |
dependency-graph: generate-and-submit | |
- name: Build application | |
run: | | |
./gradlew clean build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |