Skip to content

Commit d467d45

Browse files
jaci-nordicthst-nordic
authored andcommitted
ci: fix src-mirror workflow clone path
Adjust folder structure Signed-off-by: Jakub Cieśla <jakub.ciesla@nordicsemi.no>
1 parent c8c917f commit d467d45

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

.github/workflows/src-mirror.yml

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,57 @@
11
name: src-mirror
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
git-ref:
7+
description: 'Branch, tag or SHA to checkout'
8+
required: true
9+
default: 'main'
410
push:
511
tags:
612
- '*'
13+
pull_request:
14+
types:
15+
- opened
16+
- synchronize
17+
paths:
18+
- .github/workflows/src-mirror.yml
19+
20+
concurrency:
21+
group: src-mirror-${{ github.ref }}
22+
cancel-in-progress: true
723

824
jobs:
9-
zip-and-upload:
10-
runs-on: ubuntu-24.04-16cores
1125

26+
# Tar entire project west workspace, prune, and upload to artifact service.
27+
standard:
28+
runs-on: ubuntu-24.04-16cores
1229
steps:
13-
- name: Upload source to Artifactory
14-
uses: nrfconnect/action-src-mirror@main
30+
- name: Upload src.tar.gz
31+
uses: nrfconnect/action-src-mirror@development
1532
with:
16-
git-ref: ${{ github.ref_name }}
17-
git-fetch-depth: '0'
18-
path: 'workspace/sdk-nrf-bm'
33+
path: 'ncs-bm'
1934
west-update-args: ''
20-
artifactory-url: 'https://eu.files.nordicsemi.com/artifactory'
21-
artifactory-repository: 'ncs-src-mirror'
22-
artifactory-target-prefix: 'external/sdk-nrf-bm'
23-
artifactory-target-file-name: 'src.tar.gz'
35+
artifactory-path: >-
36+
${{ (github.ref_type != 'tag') &&
37+
format('ncs-src-mirror/internal/{0}/{1}/src.tar.gz', github.event.repository.name, github.ref_name) ||
38+
format('ncs-src-mirror/external/{0}/{1}/src.tar.gz', github.event.repository.name, github.ref_name) }}
2439
artifactory-user: ${{ secrets.COM_NORDICSEMI_FILES_USERNAME }}
2540
artifactory-pass: ${{ secrets.COM_NORDICSEMI_FILES_PASSWORD }}
41+
42+
# west update with --narrow & --shallow gives smaller size but no git history.
43+
# narrow:
44+
# runs-on: ubuntu-24.04-16cores
45+
# steps:
46+
# - name: Upload src.tar.gz
47+
# uses: nrfconnect/action-src-mirror@development
48+
# with:
49+
# path: 'ncs-bm'
50+
# west-update-args: '--narrow'
51+
# git-fetch-depth: 1
52+
# artifactory-path: >-
53+
# ${{ (github.ref_type != 'tag') &&
54+
# format('ncs-src-mirror/internal/{0}/{1}/src-narrow.tar.gz', github.event.repository.name, github.ref_name) ||
55+
# format('ncs-src-mirror/external/{0}/{1}/src-narrow.tar.gz', github.event.repository.name, github.ref_name) }}
56+
# artifactory-user: ${{ secrets.COM_NORDICSEMI_FILES_USERNAME }}
57+
# artifactory-pass: ${{ secrets.COM_NORDICSEMI_FILES_PASSWORD }}

0 commit comments

Comments
 (0)