Skip to content

Commit

Permalink
Fix metadata updating by using required Java version
Browse files Browse the repository at this point in the history
  • Loading branch information
krzema12 committed Sep 18, 2024
1 parent 96ed5d8 commit f1cec87
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/update-metadata.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@

@file:Repository("https://bindings.krzeminski.it")
@file:DependsOn("actions:checkout:v4")
@file:DependsOn("actions:setup-java:v4")

import io.github.typesafegithub.workflows.actions.actions.Checkout
import io.github.typesafegithub.workflows.actions.actions.SetupJava
import io.github.typesafegithub.workflows.annotations.ExperimentalKotlinLogicStep
import io.github.typesafegithub.workflows.domain.RunnerType
import io.github.typesafegithub.workflows.dsl.workflow
Expand All @@ -28,6 +30,10 @@ workflow(
runsOn = RunnerType.UbuntuLatest,
) {
uses(action = Checkout())
uses(action = SetupJava(
distribution = SetupJava.Distribution.Zulu,
javaVersion = "17",
))
run(
name = "Configure git",
command = """
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/update-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@ jobs:
- id: 'step-0'
uses: 'actions/checkout@v4'
- id: 'step-1'
uses: 'actions/setup-java@v4'
with:
java-version: '17'
distribution: 'zulu'
- id: 'step-2'
name: 'Configure git'
run: |-
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
- id: 'step-2'
- id: 'step-3'
name: 'Run generation logic'
env:
GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}'
run: 'GHWKT_RUN_STEP=''generate:step-2'' ''.github/workflows/update-metadata.main.kts'''
- id: 'step-3'
run: 'GHWKT_RUN_STEP=''generate:step-3'' ''.github/workflows/update-metadata.main.kts'''
- id: 'step-4'
name: 'Push new commit'
run: 'git push'

0 comments on commit f1cec87

Please sign in to comment.