Kotlinize and commonize ComposerWithCommentEnabledTest (#374) #123
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
# This file was generated using Kotlin DSL (.github/workflows/check-upstream.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: 'Check upstream' | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: | |
- 'main' | |
schedule: | |
- cron: '0 0 * * 6' | |
jobs: | |
check_yaml_consistency: | |
name: 'Check YAML consistency' | |
runs-on: 'ubuntu-latest' | |
steps: | |
- id: 'step-0' | |
name: 'Check out' | |
uses: 'actions/checkout@v4' | |
- id: 'step-1' | |
name: 'Execute script' | |
run: 'rm ''.github/workflows/check-upstream.yaml'' && ''.github/workflows/check-upstream.main.kts''' | |
- id: 'step-2' | |
name: 'Consistency check' | |
run: 'git diff --exit-code ''.github/workflows/check-upstream.yaml''' | |
check: | |
runs-on: 'ubuntu-latest' | |
needs: | |
- 'check_yaml_consistency' | |
steps: | |
- id: 'step-0' | |
uses: 'actions/checkout@v4' | |
with: | |
ref: 'commits-to-upstream-badge' | |
- id: 'step-1' | |
name: 'Clone snakeyaml-engine and check for changes' | |
run: |- | |
git clone --branch master --single-branch https://bitbucket.org/snakeyaml/snakeyaml-engine.git | |
wget https://raw.githubusercontent.com/krzema12/snakeyaml-engine-kmp/${{ github.ref }}/latest-analyzed-upstream-commit.txt | |
cd snakeyaml-engine | |
UPSTREAM_COMMIT=$(cat ../latest-analyzed-upstream-commit.txt) | |
echo "See in BitBucket: https://bitbucket.org/snakeyaml/snakeyaml-engine/branches/compare/master..$UPSTREAM_COMMIT" > ../log-diff-between-repos.txt | |
echo "" >> ../log-diff-between-repos.txt | |
git log --oneline $UPSTREAM_COMMIT..master >> ../log-diff-between-repos.txt | |
git log --oneline $UPSTREAM_COMMIT..master | wc -l > ../number-of-commits.txt | |
- id: 'step-2' | |
name: 'Create an SVG with the number of commits' | |
run: 'wget -O commits-to-upstream-badge.svg https://img.shields.io/badge/Not%20analyzed%20from%20upstream-$(cat number-of-commits.txt)-blue' | |
- id: 'step-3' | |
name: 'Preview badge' | |
run: 'cat commits-to-upstream-badge.svg' | |
- id: 'step-4' | |
name: 'Preview log diff' | |
run: 'cat log-diff-between-repos.txt' | |
- id: 'step-5' | |
name: 'Commit updated badge and log diff' | |
run: |- | |
git config --global user.email "<>" | |
git config --global user.name "GitHub Actions Bot" | |
git add commits-to-upstream-badge.svg | |
git add log-diff-between-repos.txt | |
git commit --allow-empty -m "Regenerate badge and log diff" | |
git push |