Skip to content

Commit

Permalink
Add artifact comment to PRs (#651)
Browse files Browse the repository at this point in the history
* feat: add deprecations for brick:TeamRoom, brick:Lobby, and brick:Lounge in recpatches.ttl

* chore: remove deprecated location classes from recpatches.ttl

* feat: update deprecated brick classes to their corresponding rec classes in recpatches.ttl

* try to upload artifact on PR

* fix if condition for v4

* only comment once

* fixing the expressions. Use a variable to configure which version of python to use. cancel in-progress builds
  • Loading branch information
gtfierro authored Aug 15, 2024
1 parent 27f7104 commit de40f86
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ on:
- master
- v1.*
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# the python version to release the ontology with.
# Must be a version in the matrix.python-version list
RELEASE_PYTHON_VERSION: '3.10'

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -34,12 +44,22 @@ jobs:
make
cat Brick.ttl
- name: upload ttls
if: ${{ matrix.python-version }} == "3.10"
uses: actions/upload-artifact@v3
id: upload-ttls
if: ${{ matrix.python-version == env.RELEASE_PYTHON_VERSION }}
uses: actions/upload-artifact@v4
with:
name: Brick-ontology
path: |
Brick.ttl
- name: comment artifact
# if the trigger is on a pull request
if: ${{ github.event_name == 'pull_request' && matrix.python-version == env.RELEASE_PYTHON_VERSION }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.number }}
# in the body, make a markdown link to the steps.upload-ttls.output.artifact-url
body: |
The latest build of the Brick ontology on this PR is available [here](${{ steps.upload-ttls.outputs.artifact-url }}).
- name: Run the tests
# -s flag: do not capture output (avoids killing test after 10 min)
run: |
Expand Down

0 comments on commit de40f86

Please sign in to comment.