Skip to content

Commit 0cc3638

Browse files
committed
docs(README): Use main branch in examples
Updated examples to use the main branch and added note advising users to use tagged revisions for production instead of the main branch. This change reduces the need to update the README every time a new revision of the GitHub action for ORT is tagged. Signed-off-by: Thomas Steenbergen <[email protected]>
1 parent 5b1bac0 commit 0cc3638

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ within [GitHub Actions][gh-action-docs].
77

88
See [action.yml](action.yml)
99

10+
Note: All examples below use the main branch.
11+
When implementing the GitHub Action for ORT in production, it's recommended to use the latest [tags][ort-gh-action-tags].
12+
1013
### Basic
1114

1215
```yaml
@@ -19,7 +22,7 @@ jobs:
1922
- name: Checkout project
2023
uses: actions/checkout@v3
2124
- name: Run GitHub Action for ORT
22-
uses: oss-review-toolkit/ort-ci-github-action@v1
25+
uses: oss-review-toolkit/ort-ci-github-action@main
2326
```
2427
2528
Alternatively, you can also use ORT to download the project sources using Git, Git-repo, Mercurial or Subversion.
@@ -32,7 +35,7 @@ jobs:
3235
- name: Use HTTPS instead of SSH for Git cloning
3336
run: git config --global url.https://github.com/.insteadOf ssh://[email protected]/
3437
- name: Run GitHub Action for ORT
35-
uses: oss-review-toolkit/ort-ci-github-action@v1
38+
uses: oss-review-toolkit/ort-ci-github-action@main
3639
with:
3740
vcs-url: 'https://github.com/jshttp/mime-types.git'
3841
```
@@ -63,7 +66,7 @@ jobs:
6366
with:
6467
repository: 'jshttp/mime-types'
6568
- name: Run GitHub Action for ORT
66-
uses: oss-review-toolkit/ort-ci-github-action@v1
69+
uses: oss-review-toolkit/ort-ci-github-action@main
6770
with:
6871
allow-dynamic-versions: 'true'
6972
ort-cli-args: '-P ort.analyzer.enabledPackageManagers=NPM,Yarn,Yarn2'
@@ -85,7 +88,7 @@ jobs:
8588
with:
8689
repository: 'jshttp/mime-types'
8790
- name: Run GitHub Action for ORT
88-
uses: oss-review-toolkit/ort-ci-github-action@v1
91+
uses: oss-review-toolkit/ort-ci-github-action@main
8992
with:
9093
allow-dynamic-versions: 'true'
9194
ort-cli-analyze-args: >
@@ -115,7 +118,7 @@ jobs:
115118
with:
116119
repository: 'jshttp/mime-types'
117120
- name: Run GitHub Action for ORT
118-
uses: oss-review-toolkit/ort-ci-github-action@v1
121+
uses: oss-review-toolkit/ort-ci-github-action@main
119122
with:
120123
allow-dynamic-versions: 'true'
121124
fail-on: 'violations'
@@ -156,7 +159,7 @@ jobs:
156159
StrictHostKeyChecking no
157160
END
158161
- name: Run GitHub Action for ORT
159-
uses: oss-review-toolkit/ort-ci-github-action@v1
162+
uses: oss-review-toolkit/ort-ci-github-action@main
160163
with:
161164
allow-dynamic-versions: 'true'
162165
```
@@ -186,7 +189,7 @@ jobs:
186189
github-server-url: 'https://git.example.com'
187190
token: ${{ secrets.PERSONAL_TOKEN_2 }}
188191
- name: Run GitHub action for ORT
189-
uses: oss-review-toolkit/ort-ci-github-action@v1
192+
uses: oss-review-toolkit/ort-ci-github-action@main
190193
with:
191194
ort-config-repository: 'https://oauth2:${{ secrets.PERSONAL_TOKEN_2 }}@git.example.com/ort-project/ort-config.git'
192195
run: >
@@ -216,7 +219,7 @@ jobs:
216219
- uses: actions/checkout@v3
217220
with:
218221
repository: ${{ matrix.repository }}
219-
- uses: oss-review-toolkit/ort-ci-github-action@v1
222+
- uses: oss-review-toolkit/ort-ci-github-action@main
220223
with:
221224
sw-name: ${{ matrix.sw-name }}
222225
```
@@ -241,7 +244,7 @@ jobs:
241244
with:
242245
repository: 'jshttp/mime-types'
243246
- name: Run GitHub Action for ORT
244-
uses: oss-review-toolkit/ort-ci-github-action@v1
247+
uses: oss-review-toolkit/ort-ci-github-action@main
245248
with:
246249
ort-config-repository: 'https://github.com/oss-review-toolkit/ort-config'
247250
ort-config-revision: 'e4ae8f0a2d0415e35d80df0f48dd95c90a992514'
@@ -259,7 +262,7 @@ jobs:
259262
- name: Checkout project
260263
uses: actions/checkout@v3
261264
- name: Run GitHub Action for ORT
262-
uses: oss-review-toolkit/ort-ci-github-action@v1
265+
uses: oss-review-toolkit/ort-ci-github-action@main
263266
with:
264267
image: 'my-org/ort-images/ort:latest'
265268
```
@@ -288,7 +291,7 @@ jobs:
288291
repository: 'jshttp/mime-types'
289292
ref: '2.1.35'
290293
- name: Run GitHub Action for ORT
291-
uses: oss-review-toolkit/ort-ci-github-action@v1
294+
uses: oss-review-toolkit/ort-ci-github-action@main
292295
with:
293296
db-url: ${{ secrets.POSTGRES_URL }}
294297
db-username: ${{ secrets.POSTGRES_USERNAME }}
@@ -308,7 +311,7 @@ jobs:
308311
- name: Checkout project
309312
uses: actions/checkout@v3
310313
- name: Run GitHub Action for ORT
311-
uses: oss-review-toolkit/ort-ci-github-action@v1
314+
uses: oss-review-toolkit/ort-ci-github-action@main
312315
with:
313316
run: >
314317
cache-dependencies,
@@ -341,5 +344,6 @@ OSS Review Toolkit (ORT) is a [Linux Foundation project][lf] and part of [ACT][a
341344
[ort]: https://github.com/oss-review-toolkit/ort
342345
[ort-config-yml]: https://github.com/oss-review-toolkit/ort/blob/main/model/src/main/resources/reference.yml
343346
[ort-contributing-md]: https://github.com/oss-review-toolkit/.github/blob/main/CONTRIBUTING.md
347+
[ort-gh-action-tags]: https://github.com/oss-review-toolkit/ort-ci-github-action/tags
344348
[ort-slack]: http://slack.oss-review-toolkit.org
345349
[lf]: https://www.linuxfoundation.org

0 commit comments

Comments
 (0)