Skip to content

Commit f9e9a0a

Browse files
committed
ci: Update sdk-manager index.json when tag is placed
Update sdk-manager index.json to reduce manual steps when tag is placed Align with new API of action-src-mirror action Signed-off-by: Jan Gałda <[email protected]>
1 parent 174705e commit f9e9a0a

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

.github/workflows/src-mirror.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,10 @@
1-
name: src-mirror
1+
name: Generate src mirror package
22

33
on:
44
workflow_dispatch:
5-
inputs:
6-
git-ref:
7-
description: 'Branch, tag or SHA to checkout'
8-
required: true
9-
default: 'main'
105
push:
116
tags:
127
- '*'
13-
pull_request:
14-
types:
15-
- opened
16-
- synchronize
17-
paths:
18-
- .github/workflows/src-mirror.yml
198

209
concurrency:
2110
group: src-mirror-${{ github.ref }}
@@ -24,17 +13,27 @@ concurrency:
2413
jobs:
2514

2615
# Tar entire project west workspace, prune, and upload to artifact service.
27-
standard:
16+
generate-src-mirror-package:
2817
runs-on: ubuntu-24.04-16cores
2918
steps:
19+
20+
- name: Set STABLE variable
21+
run: |
22+
if [[ "${{ github.ref_type }}" == "tag" ]] && [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
23+
echo "STABLE=true" >> $GITHUB_ENV
24+
else
25+
echo "STABLE=false" >> $GITHUB_ENV
26+
fi
27+
echo "STABLE=${{ env.STABLE }}"
28+
3029
- name: Upload src.tar.gz
3130
uses: nrfconnect/action-src-mirror@main
3231
with:
32+
git-ref: ${{ github.ref_name }}
3333
path: 'nrf'
3434
west-update-args: ''
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/{1}/src.tar.gz', github.event.repository.name, github.ref_name) }}
35+
sdk-manager-api-version: '1'
36+
artifactory-base-folder-path: ${{ (github.ref_type == 'tag') && 'ncs-src-mirror/external/' || 'ncs-src-mirror/internal/' }}
3937
artifactory-user: ${{ secrets.COM_NORDICSEMI_FILES_USERNAME }}
4038
artifactory-pass: ${{ secrets.COM_NORDICSEMI_FILES_PASSWORD }}
39+
stable: ${{ env.STABLE }}

0 commit comments

Comments
 (0)