Skip to content

Commit

Permalink
Merge pull request #1179 from nextcloud/repo-sync/android-config/master
Browse files Browse the repository at this point in the history
🔄 synced file(s) with nextcloud/android-config
  • Loading branch information
AndyScherzinger authored Aug 15, 2023
2 parents 4283478 + a97b365 commit 1f0b427
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# synced from @nextcloud/android-config
name: "Analysis"

on:
pull_request:
branches: [ master, stable-* ]
branches: [ "master", "main", "stable-*" ]
push:
branches: [ master, stable-* ]
branches: [ "master", "main", "stable-*" ]

permissions:
pull-requests: write
contents: write

concurrency:
group: analysis-wrapper-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
analysis:
Expand All @@ -15,24 +24,31 @@ jobs:
run: |
if [ -z "$GITHUB_HEAD_REF" ]; then
# push
echo "::set-output name=branch::$GITHUB_REF_NAME"
echo "::set-output name=pr::$GITHUB_RUN_ID"
echo "branch=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
echo "pr=$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT"
echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT"
else
# pull request
echo "::set-output name=branch::$GITHUB_HEAD_REF"
echo "::set-output name=pr::${{ github.event.pull_request.number }}"
echo "branch=$GITHUB_HEAD_REF" >> "$GITHUB_OUTPUT"
echo "pr=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> "$GITHUB_OUTPUT"
fi
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: ${{ steps.get-vars.outputs.repo }}
ref: ${{ steps.get-vars.outputs.branch }}
- name: Set up JDK 17
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with:
distribution: "temurin"
java-version: 17
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
repository: ${{ steps.get-vars.outputs.repo }}
ref: ${{ steps.get-vars.outputs.branch }}
- name: Set up JDK 17
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
with:
distribution: "temurin"
java-version: 17
- name: Install dependencies
run: |
python3 -m pip install defusedxml
- name: Run analysis wrapper
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p $HOME/.gradle
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
scripts/analysis/analysis-wrapper.sh ${{ secrets.GIT_USERNAME }} ${{ secrets.GITHUB_TOKEN }} ${{ steps.get-vars.outputs.branch }} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ steps.get-vars.outputs.pr }}
scripts/analysis/analysis-wrapper.sh ${{ steps.get-vars.outputs.branch }} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ steps.get-vars.outputs.pr }}
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
swap-size-gb: 10
- name: Initialize CodeQL
uses: github/codeql-action/init@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3
uses: github/codeql-action/init@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4
with:
languages: ${{ matrix.language }}
- name: Set up JDK 17
Expand All @@ -46,4 +46,4 @@ jobs:
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
./gradlew assembleDebug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3
uses: github/codeql-action/analyze@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3
uses: github/codeql-action/upload-sarif@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4
with:
sarif_file: results.sarif

0 comments on commit 1f0b427

Please sign in to comment.