Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 46
ci: harden workflow security#1211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
5c6143dc08ae401c663d5b649607d33179f2f70376194a4b5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -9,23 +9,27 @@ on: | ||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| android-api-level: [ 21, 24, 29, 35 ] | ||
| steps: | ||
| - name: checkout | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| with: | ||
| persist-credentials: false | ||
| - name: Set up the JDK | ||
| uses: actions/setup-java@v3 | ||
| uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' | ||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v5 | ||
| uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5 | ||
| timeout-minutes: 5 | ||
| # API 30+ emulators only have x86_64 system images. | ||
| @@ -38,7 +42,7 @@ jobs: | ||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger --name-match=kvm | ||
| - uses: reactivecircus/android-emulator-runner@v2 | ||
| - uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2 | ||
| with: | ||
| api-level: ${{ matrix.android-api-level }} | ||
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
| @@ -48,7 +52,7 @@ jobs: | ||
| # Print emulator logs if tests fail | ||
| script: ./gradlew :android:connectedAndroidTest ${{ matrix.android-api-level == 19 && '-PhttpURLConnection' || '' }} || (adb logcat -d System.out:I && exit 1) | ||
| - uses: actions/upload-artifact@v4 | ||
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| if: always() | ||
| with: | ||
| name: android-build-reports-${{ matrix.android-api-level }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -13,29 +13,31 @@ jobs: | ||
| id-token: write | ||
| deployments: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| with: | ||
| persist-credentials: false | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@v1 | ||
| uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1 | ||
| with: | ||
| aws-region: eu-west-2 | ||
| role-to-assume: arn:aws:iam::${{ secrets.ABLY_AWS_ACCOUNT_ID_SDK }}:role/ably-sdk-builds-ably-java | ||
| role-session-name: "${{ github.run_id }}-${{ github.run_number }}" | ||
| - name: Set up the JDK | ||
| uses: actions/setup-java@v4 | ||
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' | ||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v3 | ||
| uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3 | ||
| - name: Build docs | ||
| run: ./gradlew javadoc | ||
| - name: Upload Documentation | ||
| uses: ably/sdk-upload-action@v2 | ||
| uses: ably/sdk-upload-action@4e694297f208b72b5a9f6b1248a1556f19f821d6 # v2 | ||
| with: | ||
| sourcePath: java/build/docs/javadoc | ||
| githubToken: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -7,9 +7,13 @@ jobs: | ||
| run-on-release: | ||
| runs-on: ubuntu-latest | ||
| if: github.repository == 'ably/ably-java' | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
coderabbitai[bot] marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| with: | ||
| persist-credentials: false | ||
| - name: Extract tag | ||
| id: tag | ||
| @@ -34,13 +38,13 @@ jobs: | ||
| TAG: ${{ steps.tag.outputs.tag }} | ||
| - name: Set up JDK | ||
| uses: actions/setup-java@v4 | ||
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | ||
| with: | ||
| java-version: 17 | ||
| distribution: temurin | ||
| - name: Set up Gradle | ||
| uses: gradle/actions/setup-gradle@v3 | ||
| uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3 | ||
| - name: Publish and release to Maven Central | ||
| run: ./gradlew publishAndReleaseToMavenCentral | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.