|
1 | 1 | name: src-mirror |
2 | 2 |
|
3 | 3 | on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + git-ref: |
| 7 | + description: 'Branch, tag or SHA to checkout' |
| 8 | + required: true |
| 9 | + default: 'main' |
4 | 10 | push: |
5 | 11 | tags: |
6 | 12 | - '*' |
| 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 |
7 | 23 |
|
8 | 24 | jobs: |
9 | | - zip-and-upload: |
10 | | - runs-on: ubuntu-24.04-16cores |
11 | 25 |
|
| 26 | + # Tar entire project west workspace, prune, and upload to artifact service. |
| 27 | + standard: |
| 28 | + runs-on: ubuntu-24.04-16cores |
12 | 29 | 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 |
15 | 32 | with: |
16 | | - git-ref: ${{ github.ref_name }} |
17 | | - git-fetch-depth: '0' |
18 | | - path: 'workspace/sdk-nrf-bm' |
| 33 | + path: 'ncs-bm' |
19 | 34 | 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) }} |
24 | 39 | artifactory-user: ${{ secrets.COM_NORDICSEMI_FILES_USERNAME }} |
25 | 40 | 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