Skip to content

Build and run

Build and run #130

Workflow file for this run

name: Build and run
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 9 * * *'
push:
branches: [ main, 'feat/**' ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ main, 'feat/**' ]
paths-ignore:
- '**.md'
jobs:
build-and-run:
runs-on: ubuntu-latest
permissions:
id-token: write # Needed if using OIDC to get release secrets.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- run: ./gradlew assemble
- uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.1.0
name: 'Get the server SDK key'
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/sdk/common/hello-apps/server-key = LAUNCHDARKLY_SDK_KEY,
/sdk/common/hello-apps/boolean-flag-key = LAUNCHDARKLY_FLAG_KEY'
- run: java -jar build/libs/hello-openfeature-java-server-1.0-SNAPSHOT-all.jar
- uses: launchdarkly/gh-actions/actions/verify-hello-app@verify-hello-app-v2.0.0
with:
use_server_key: true
role_arn: ${{ vars.AWS_ROLE_ARN }}
command: java -jar build/libs/hello-openfeature-java-server-1.0-SNAPSHOT-all.jar