Skip to content

Commit 18c7dfb

Browse files
committed
chore: simplify GitHub Actions workflows by removing unnecessary checkout steps and enhancing artifact retention
Signed-off-by: Nora Blomaard <n.blomaard@gmail.com>
1 parent 24aca10 commit 18c7dfb

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

.github/workflows/sonarcloud-analysis.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,7 @@ jobs:
4646
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4747
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4848
with:
49-
repository: ${{ github.event.workflow_run.head_repository.full_name }}
50-
ref: ${{ github.event.workflow_run.head_branch }}
5149
fetch-depth: 0
52-
persist-credentials: false
53-
- name: Checkout base branch
54-
if: github.event.workflow_run.event == 'pull_request'
55-
run: |
56-
git remote add upstream ${{ github.event.repository.clone_url }}
57-
git fetch upstream
58-
git checkout -B ${{ fromJson(steps.get_pr_data.outputs.data).base.ref }} upstream/${{ fromJson(steps.get_pr_data.outputs.data).base.ref }}
59-
git checkout ${{ github.event.workflow_run.head_branch }}
60-
git clean -ffdx && git reset --hard HEAD
6150
- name: Download build artifacts
6251
uses: dawidd6/action-download-artifact@5c98f0b039f36ef966fdb7dfa9779262785ecb05 # v14
6352
with:

.github/workflows/sonarcloud-build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
with:
5757
name: build-artifacts
5858
path: |
59+
service/src/
60+
app/src/
5961
service/target/
6062
app/target/
6163
retention-days: 1

0 commit comments

Comments
 (0)