Skip to content

Commit 2a24fca

Browse files
Merge pull request #1828 from nextcloud/repo-sync/android-config/main
πŸ”„ synced file(s) with nextcloud/android-config
2 parents 73b1bd3 + b164743 commit 2a24fca

File tree

5 files changed

+65
-8
lines changed

5 files changed

+65
-8
lines changed

β€Ž.github/workflows/analysis.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# synced from @nextcloud/android-config
2+
name: "Analysis"
3+
4+
on:
5+
pull_request:
6+
branches: [ "master", "main", "stable-*" ]
7+
push:
8+
branches: [ "master", "main", "stable-*" ]
9+
10+
permissions:
11+
pull-requests: write
12+
contents: write
13+
14+
concurrency:
15+
group: analysis-wrapper-${{ github.head_ref || github.run_id }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
analysis:
20+
runs-on: ubuntu-22.04
21+
steps:
22+
- name: Setup variables
23+
id: get-vars
24+
run: |
25+
if [ -z "$GITHUB_HEAD_REF" ]; then
26+
# push
27+
echo "branch=$GITHUB_REF_NAME" >> "$GITHUB_OUTPUT"
28+
echo "pr=$GITHUB_RUN_ID" >> "$GITHUB_OUTPUT"
29+
echo "repo=${{ github.repository }}" >> "$GITHUB_OUTPUT"
30+
else
31+
# pull request
32+
echo "branch=$GITHUB_HEAD_REF" >> "$GITHUB_OUTPUT"
33+
echo "pr=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT"
34+
echo "repo=${{ github.event.pull_request.head.repo.full_name }}" >> "$GITHUB_OUTPUT"
35+
fi
36+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
37+
with:
38+
repository: ${{ steps.get-vars.outputs.repo }}
39+
ref: ${{ steps.get-vars.outputs.branch }}
40+
- name: Set up JDK 17
41+
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
42+
with:
43+
distribution: "temurin"
44+
java-version: 17
45+
- name: Install dependencies
46+
run: |
47+
python3 -m pip install defusedxml
48+
- name: Run analysis wrapper
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
run: |
52+
mkdir -p $HOME/.gradle
53+
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > $HOME/.gradle/gradle.properties
54+
scripts/analysis/analysis-wrapper.sh ${{ steps.get-vars.outputs.branch }} ${{ secrets.LOG_USERNAME }} ${{ secrets.LOG_PASSWORD }} $GITHUB_RUN_NUMBER ${{ steps.get-vars.outputs.pr }}

β€Ž.github/workflows/codeql.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ jobs:
2626
language: [ 'java' ]
2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@v4 # v3.5.3
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3030
- name: Set Swap Space
3131
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c # v1.0
3232
with:
3333
swap-size-gb: 10
3434
- name: Initialize CodeQL
35-
uses: github/codeql-action/init@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
35+
uses: github/codeql-action/init@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
3636
with:
3737
languages: ${{ matrix.language }}
3838
- name: Set up JDK 17
39-
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
39+
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
4040
with:
4141
distribution: "temurin"
4242
java-version: 17
@@ -46,4 +46,4 @@ jobs:
4646
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError" > "$HOME/.gradle/gradle.properties"
4747
./gradlew assembleDebug
4848
- name: Perform CodeQL Analysis
49-
uses: github/codeql-action/analyze@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
49+
uses: github/codeql-action/analyze@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8

β€Ž.github/workflows/gradle-wrapper-validation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ jobs:
1818
name: "Validation"
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4 # v3.5.3
22-
- uses: gradle/wrapper-validation-action@8d49e559aae34d3e0eb16cde532684bc9702762b # v1.0.6
21+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
22+
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # v1.1.0

β€Ž.github/workflows/scorecard.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424

2525
steps:
2626
- name: "Checkout code"
27-
uses: actions/checkout@v4 # v3.5.3
27+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2828
with:
2929
persist-credentials: false
3030

@@ -37,6 +37,6 @@ jobs:
3737

3838
# Upload the results to GitHub's code scanning dashboard.
3939
- name: "Upload to code-scanning"
40-
uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
40+
uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8
4141
with:
4242
sarif_file: results.sarif
+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
exit 0

0 commit comments

Comments
Β (0)