Skip to content

Commit

Permalink
Fix broken checkout of submodules
Browse files Browse the repository at this point in the history
The submodule plugin is no longer developed. We can use the submodule
function of the default checkout script
  • Loading branch information
programming-wolf committed Nov 24, 2021
1 parent e0c4f6b commit fd7a7b6
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 87 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
138 changes: 69 additions & 69 deletions .github/workflows/build_releasecandidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
});
}

0 comments on commit fd7a7b6

Please sign in to comment.