From fd7a7b682b09d80b611f8ac8d7eb6b8ed970a426 Mon Sep 17 00:00:00 2001 From: Benjamin Wolf Date: Wed, 24 Nov 2021 13:04:36 +0100 Subject: [PATCH] Fix broken checkout of submodules The submodule plugin is no longer developed. We can use the submodule function of the default checkout script --- .github/workflows/build_master.yml | 4 +- .github/workflows/build_pr.yml | 32 ++--- .github/workflows/build_releasecandidate.yml | 138 +++++++++---------- 3 files changed, 87 insertions(+), 87 deletions(-) diff --git a/.github/workflows/build_master.yml b/.github/workflows/build_master.yml index 1f88a38..54907dc 100644 --- a/.github/workflows/build_master.yml +++ b/.github/workflows/build_master.yml @@ -22,8 +22,8 @@ jobs: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout Source uses: actions/checkout@v2 - - name: Checkout Submodules - uses: textbook/git-checkout-submodule-action@master + with: + submodules: recursive - name: Verify Gradle Wrapper uses: gradle/wrapper-validation-action@v1 - name: Set up JDK 14 diff --git a/.github/workflows/build_pr.yml b/.github/workflows/build_pr.yml index 2b272dc..e187c68 100644 --- a/.github/workflows/build_pr.yml +++ b/.github/workflows/build_pr.yml @@ -17,19 +17,19 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: checkout source - uses: actions/checkout@v2 - - name: Checkout submodules - uses: textbook/git-checkout-submodule-action@master - - name: Verify Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Set up JDK 14 - uses: actions/setup-java@v1 - with: - java-version: 14 - - name: Execute Gradle Build - uses: eskatos/gradle-command-action@v1 - with: - # Gradle command line arguments, see gradle --help - arguments: buildDocs + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: checkout source + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Verify Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: 14 + - name: Execute Gradle Build + uses: eskatos/gradle-command-action@v1 + with: + # Gradle command line arguments, see gradle --help + arguments: buildDocs diff --git a/.github/workflows/build_releasecandidate.yml b/.github/workflows/build_releasecandidate.yml index 94ccd38..efaa2ad 100644 --- a/.github/workflows/build_releasecandidate.yml +++ b/.github/workflows/build_releasecandidate.yml @@ -18,74 +18,74 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout Source - uses: actions/checkout@v2 - - name: Checkout Submodules - uses: textbook/git-checkout-submodule-action@master - - name: Verify Gradle Wrapper - uses: gradle/wrapper-validation-action@v1 - - name: Set up JDK 14 - uses: actions/setup-java@v1 - with: - java-version: 14 - - name: Execute Gradle Build - uses: eskatos/gradle-command-action@v1 - with: - # Gradle command line arguments, see gradle --help - arguments: buildDocs + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout Source + uses: actions/checkout@v2 + with: + submodules: recursive + - name: Verify Gradle Wrapper + uses: gradle/wrapper-validation-action@v1 + - name: Set up JDK 14 + uses: actions/setup-java@v1 + with: + java-version: 14 + - name: Execute Gradle Build + uses: eskatos/gradle-command-action@v1 + with: + # Gradle command line arguments, see gradle --help + arguments: buildDocs - # do the following two things only for a release! - - name: Set Environment Variables for Release Version - if: startsWith(github.ref, 'refs/tags/') - run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV - - name: Create New Release Candidate - if: startsWith(github.ref, 'refs/tags/') - id: create-release-candidate - uses: actions/create-release@latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ env.RELEASE_VERSION }} - release_name: Release Candidate ${{ env.RELEASE_VERSION }} - draft: false - prerelease: true - - name: Prepare Deployment - if: startsWith(github.ref, 'refs/tags/') - run: | - rm -rf ./build/tmp - cp ./docs-ext/curriculum-*.pdf ./build 2>/dev/null || : - zip -r release.zip ./build - mkdir release_dir - cp ./build/curriculum-*.pdf ./release_dir 2>/dev/null || : - mv release.zip ./release_dir/release-${{ env.RELEASE_VERSION }}.zip - - name: Deploy Release Candidate to GitHub Pages - if: startsWith(github.ref, 'refs/tags/') - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build - destination_dir: release-candidate - keep_files: true - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - commit_message: Publish Release Candidate ${{ env.RELEASE_VERSION }} - - name: Upload Release Candidate Files - if: startsWith(github.ref, 'refs/tags/') - id: upload-release-candidate-assets - uses: actions/github-script@v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - script: | - const fs = require('fs').promises; - const { repo: { owner, repo }, sha } = context; + # do the following two things only for a release! + - name: Set Environment Variables for Release Version + if: startsWith(github.ref, 'refs/tags/') + run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV + - name: Create New Release Candidate + if: startsWith(github.ref, 'refs/tags/') + id: create-release-candidate + uses: actions/create-release@latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ env.RELEASE_VERSION }} + release_name: Release Candidate ${{ env.RELEASE_VERSION }} + draft: false + prerelease: true + - name: Prepare Deployment + if: startsWith(github.ref, 'refs/tags/') + run: | + rm -rf ./build/tmp + cp ./docs-ext/curriculum-*.pdf ./build 2>/dev/null || : + zip -r release.zip ./build + mkdir release_dir + cp ./build/curriculum-*.pdf ./release_dir 2>/dev/null || : + mv release.zip ./release_dir/release-${{ env.RELEASE_VERSION }}.zip + - name: Deploy Release Candidate to GitHub Pages + if: startsWith(github.ref, 'refs/tags/') + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + destination_dir: release-candidate + keep_files: true + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + commit_message: Publish Release Candidate ${{ env.RELEASE_VERSION }} + - name: Upload Release Candidate Files + if: startsWith(github.ref, 'refs/tags/') + id: upload-release-candidate-assets + uses: actions/github-script@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + script: | + const fs = require('fs').promises; + const { repo: { owner, repo }, sha } = context; - for (let file of await fs.readdir('./release_dir')) { - await github.repos.uploadReleaseAsset({ - owner, repo, - release_id: ${{ steps.create-release-candidate.outputs.id }}, - name: file, - data: await fs.readFile(`./release_dir/${file}`) - }); - } + for (let file of await fs.readdir('./release_dir')) { + await github.repos.uploadReleaseAsset({ + owner, repo, + release_id: ${{ steps.create-release-candidate.outputs.id }}, + name: file, + data: await fs.readFile(`./release_dir/${file}`) + }); + }