Set persist-credentials: false on checkout actions.
#774
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| # Cancel in-progress runs for pull requests, but not for master branch pushes | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: "JDK ${{ matrix.java }} on ${{ matrix.os }}" | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| java: [ 21, 11, 8 ] | |
| # Only test on macos and windows with a single recent JDK to avoid a | |
| # combinatorial explosion of test configurations. | |
| # Most OS-specific issues are not specific to a particular JDK version. | |
| include: | |
| - os: macos-latest | |
| java: 21 | |
| - os: windows-latest | |
| java: 21 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: 'Check out repository' | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - name: 'Cache local Maven repository' | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: 'Set up JDK ${{ matrix.java }}' | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 | |
| with: | |
| java-version: ${{ matrix.java }} | |
| distribution: 'temurin' | |
| - name: 'Install' | |
| shell: bash | |
| run: mvn -B install -U -DskipTests=true | |
| - name: 'Test' | |
| shell: bash | |
| run: mvn -B verify -U -Dmaven.javadoc.skip=true | |
| publish_snapshot: | |
| name: 'Publish snapshot' | |
| needs: test | |
| if: github.event_name == 'push' && github.repository == 'google/jimfs' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Check out repository' | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - name: 'Cache local Maven repository' | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: 'Set up JDK 8' | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 | |
| with: | |
| java-version: 8 | |
| distribution: 'temurin' | |
| server-id: central | |
| server-username: CI_DEPLOY_USERNAME | |
| server-password: CI_DEPLOY_PASSWORD | |
| - name: 'Publish' | |
| env: | |
| CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} | |
| CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} | |
| run: mvn -B clean deploy -DskipTests=true | |
| generate_docs: | |
| permissions: | |
| contents: write | |
| name: 'Generate latest docs' | |
| needs: test | |
| if: github.event_name == 'push' && github.repository == 'google/jimfs' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Check out repository' | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 | |
| with: | |
| persist-credentials: false | |
| - name: 'Cache local Maven repository' | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: 'Set up JDK 11' | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 | |
| with: | |
| java-version: 11 | |
| distribution: 'temurin' | |
| - name: 'Generate latest docs' | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./util/update_snapshot_docs.sh |