Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage artifacts during CI run #17

Merged
merged 10 commits into from
Dec 6, 2023
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ on:
jobs:
check_protos:
name: Check .proto files
uses: ./.github/workflows/check_protos.yml
uses: ./.github/workflows/check_protos.yml
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved
create_ci_artifacts:
name: Create CI artifacts
uses: ./.github/workflows/create_ci_artifacts.yml

34 changes: 34 additions & 0 deletions .github/workflows/create_ci_artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Create CI Artifacts

on:
workflow_call:
workflow_dispatch:

env:
POETRY_VERSION: 1.2.2
PYTHON_VERSION: 3.9

jobs:
build:
name: 'Proto Artifacts'
runs-on: 'ubuntu-latest'

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Create staging directory
run: |
mkdir -p ${{ runner.temp }}/staging/ni

- name: Stage protos
run: |
rsync -av --prune-empty-dirs --include "*/" --include "*.proto" --exclude "*" ni/ ${{ runner.temp }}/staging/ni/
dixonjoel marked this conversation as resolved.
Show resolved Hide resolved

- name: Upload proto artifact
uses: actions/upload-artifact@v2
with:
name: ni-apis
path: |
${{ runner.temp }}/staging
retention-days: 5
Loading