Skip to content

docs: update projects using the lib #1329

docs: update projects using the lib

docs: update projects using the lib #1329

# This file was generated using Kotlin DSL (.github/workflows/end-to-end-tests.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'End-to-end tests'
on:
push:
branches:
- 'main'
pull_request: {}
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Set up JDK'
uses: 'actions/setup-java@v4'
with:
java-version: '11'
distribution: 'zulu'
- id: 'step-2'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-3'
name: 'Publish to Maven local'
run: './gradlew publishToMavenLocal'
- id: 'step-4'
name: 'Execute script'
run: 'rm ''.github/workflows/end-to-end-tests.yaml'' && ''.github/workflows/end-to-end-tests.main.kts'''
- id: 'step-5'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/end-to-end-tests.yaml'''
test_job_1:
runs-on: 'ubuntu-latest'
permissions:
actions: 'read'
checks: 'write'
contents: 'none'
needs:
- 'check_yaml_consistency'
env:
$GREETING: 'World'
outputs:
scriptKey: '${{ steps.step-20.outputs.key }}'
scriptKey2: '${{ steps.step-20.outputs.key2 }}'
scriptResult: '${{ steps.step-20.outputs.result }}'
steps:
- id: 'step-0'
name: 'Hello world!'
run: 'echo ''hello!'''
- id: 'step-1'
name: 'Hello world! Multiline command with pipes'
run: |-
less test.txt \
| grep -P "foobar" \
| sort \
> result.txt
- id: 'step-2'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-3'
name: 'Run local action'
uses: './.github/workflows/test-local-action'
with:
name: 'Rocky'
- id: 'step-4'
name: 'Run alpine'
uses: 'docker://alpine:latest'
- id: 'step-5'
name: 'Check out again'
uses: 'actions/checkout@v4'
with:
repository: 'actions/checkout'
ref: 'v3'
path: './.github/actions/checkout'
clean: 'false'
- id: 'step-6'
name: 'Run local action'
uses: './.github/workflows/test-local-action'
with:
name: 'Balboa'
- id: 'step-7'
name: 'Run alpine'
uses: 'docker://alpine:latest'
- id: 'step-8'
uses: 'actions/setup-python@v5'
- id: 'step-9'
name: 'Some step consuming other step''s output'
uses: 'actions/checkout@v4'
with:
ssh-key: '${{ steps.step-8.outputs.python-version }}'
path: '${{ steps.step-8.outputs.my-unsafe-output }}'
- id: 'step-10'
name: 'Custom environment variable'
env:
$FIRST_NAME: 'Patrick'
run: 'echo $GREETING $FIRST_NAME'
- id: 'step-11'
name: 'Encrypted secret'
env:
$SECRET: '${{ secrets.SUPER_SECRET }}'
$TOKEN: '${{ secrets.GITHUB_TOKEN }}'
run: 'echo secret=$SECRET token=$TOKEN'
- id: 'step-12'
name: 'RunnerContext create temp directory'
run: 'mkdir ${{ runner.temp }}/build_logs'
- id: 'step-13'
name: 'GitHubContext echo sha'
run: 'echo ${{ github.sha }} ev ${{ github.event.release.url }}'
- id: 'step-14'
name: 'Default environment variable'
run: 'action=$GITHUB_ACTION repo=$GITHUB_REPOSITORY'
if: '${{ always() }}'
- id: 'step-15'
name: 'Set up JDK'
uses: 'actions/setup-java@v4'
with:
java-version: '11'
distribution: 'zulu'
- id: 'step-16'
uses: 'gradle/actions/setup-gradle@v4'
- id: 'step-17'
name: 'Publish to Maven local'
run: './gradlew publishToMavenLocal'
- id: 'step-18'
name: 'Evaluating condition for ''Step with a Kotlin-based logic'''
env:
GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}'
run: 'GHWKT_RUN_STEP=''test_job_1:step-18'' ''.github/workflows/end-to-end-tests.main.kts'''
- id: 'step-19'
name: 'Step with a Kotlin-based logic'
env:
GHWKT_GITHUB_CONTEXT_JSON: '${{ toJSON(github) }}'
run: 'GHWKT_RUN_STEP=''test_job_1:step-19'' ''.github/workflows/end-to-end-tests.main.kts'''
if: '${{ steps.step-18.outputs.evaluation-result }}'
- id: 'step-20'
uses: 'actions/github-script@v7'
with:
script: |-
core.setOutput("key", "value")
core.setOutput("key2", "value2")
return "return"
test_job_2:
runs-on: 'ubuntu-latest'
needs:
- 'test_job_1'
- 'check_yaml_consistency'
if: '${{ always() }}'
steps:
- id: 'step-0'
name: 'Hello world, again!'
run: 'echo ''hello again!'''
- id: 'step-1'
name: 'use output of script'
run: |-
echo ${{ needs.test_job_1.outputs.scriptKey }}
echo ${{ needs.test_job_1.outputs.scriptKey2 }}
echo ${{ needs.test_job_1.outputs.scriptResult }}
- id: 'step-2'
name: 'Setup Java 11 and 20'
uses: 'Wandalen/wretry.action@v3'
with:
action: 'actions/setup-java@v4'
with: |
java-version: |-
11
20
distribution: 'temurin'