GitHub Actions
RAPSπΌRAPSRust CLI for Autodesk Platform Services.View in glossary provides official composite GitHub ActionsπGitHub ActionsGitHub's built-in CI/CD platform.View in glossary for CI/CDπCI/CDAutomated build, test, and deployment pipelines.View in glossary integration at dmytro-yemelianov/raps-actions. Automate model uploads, translations, pipelines, and APSβοΈAPSAutodesk Platform Services - cloud APIs for CAD/BIM automation.View in glossary operations directly in your GitHub workflows.
Official Actions
| Action | Description |
|---|---|
dmytro-yemelianov/raps-actions/setup@v1 | Install RAPS CLIπ»CLIText-based interface for running commands.View in glossary and configure APS authentication |
dmytro-yemelianov/raps-actions/upload@v1 | Upload files to Autodesk OSSπ¦OSSAPS cloud storage for files and models.View in glossary buckets |
dmytro-yemelianov/raps-actions/translate@v1 | Translate models via Model Derivative APIπModel DerivativeAPS service for translating and extracting CAD data.View in glossary |
dmytro-yemelianov/raps-actions/pipeline@v1 | Run a RAPS pipelineβοΈPipelineAutomated sequence of build/test/deploy steps.View in glossary file |
Quick Start
# .github/workflows/aps.yml
name: APS Automation
on:
push:
paths:
- 'models/**'
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: Test Authentication
run: raps auth test
Action Inputs and Outputs
Setup Action
| Input | Description | Required | Default |
|---|---|---|---|
version | RAPS version to install | No | latest |
client-id | APS Client ID | Yes | |
client-secret | APS Client SecretπSecretEncrypted sensitive configuration value.View in glossary | Yes |
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
version: '4.16.0'
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
Upload Action
| Input | Description | Required | Default |
|---|---|---|---|
bucket | OSS bucketπͺ£BucketContainer for storing objects in OSS.View in glossary key | Yes | |
files | File path or glob pattern | Yes | |
create-bucket | Create bucket if it does not exist | No | false |
bucket-policy | Retention policy (transient, temporary, persistent) | No | transient |
| Output | Description |
|---|---|
urn | URNπURNUnique identifier for objects in APS.View in glossary of the last uploaded object |
object-count | Number of objects uploaded |
- name: Upload Model
id: upload
uses: dmytro-yemelianov/raps-actions/upload@v1
with:
bucket: my-project-bucket
files: models/*.rvt
create-bucket: 'true'
Translate Action
| Input | Description | Required | Default |
|---|---|---|---|
urn | URN of the object to translate | Yes | |
wait | Wait for translationβοΈTranslation JobBackground process converting CAD files to viewable formats.View in glossary to complete | No | true |
timeout | Maximum wait time | No | 60m |
download | Download derivatives after translation | No | false |
output-dir | Directory for downloaded derivatives | No | ./derivatives |
| Output | Description |
|---|---|
status | Translation status (success, failed, timeout) |
- name: Translate Model
uses: dmytro-yemelianov/raps-actions/translate@v1
with:
urn: ${{ steps.upload.outputs.urn }}
wait: 'true'
timeout: '30m'
Pipeline Action
| Input | Description | Required | Default |
|---|---|---|---|
file | Path to pipeline YAMLπYAMLHuman-readable configuration format.View in glossary/JSONπJSONStandard data interchange format.View in glossary file | Yes | |
variables | Pipeline variables (key=value, one per line) | No | |
dry-run | Preview pipeline without executing | No | false |
ignore-failure | Continue on stepπ§STEPISO standard for 3D CAD data exchange.View in glossary failures | No | false |
- name: Run Pipeline
uses: dmytro-yemelianov/raps-actions/pipeline@v1
with:
file: pipelines/deploy.yaml
variables: |
BUCKET=my-bucket
MODEL=building.rvt
Setting Up Secrets
- Go to your repository Settings β Secrets and variables β Actions
- Add the following secrets:
APS_CLIENT_IDβ Your APS application client IDAPS_CLIENT_SECRETβ Your APS application client secret
Workflow Examples
Upload and Translate on Push
name: Translate Models
on:
push:
paths:
- 'models/*.rvt'
- 'models/*.dwg'
jobs:
translate:
runs-on: ubuntu-latest
env:
BUCKET: ci-builds-${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: Create Bucket
run: raps bucket create $BUCKET --retention transient
- name: Upload Models
run: |
for file in models/*.rvt models/*.dwg; do
if [ -f "$file" ]; then
echo "Uploading $file..."
raps object upload $BUCKET "$file"
fi
done
- name: Translate Models
run: |
for file in models/*.rvt models/*.dwg; do
if [ -f "$file" ]; then
filename=$(basename "$file")
URN=$(raps object urn $BUCKET "$filename" --quiet)
echo "Translating $filename..."
raps translate start "$URN" --format svf2 --wait
fi
done
- name: Cleanup
if: always()
run: raps bucket delete $BUCKET --yes || true
Matrix Builds for Multiple Models
Process multiple models in parallel:
name: Parallel Translation
on: [push]
jobs:
list-models:
runs-on: ubuntu-latest
outputs:
models: ${{ steps.find.outputs.models }}
steps:
- uses: actions/checkout@v4
- id: find
run: |
models=$(find models -name "*.rvt" -printf '"%f",' | sed 's/,$//')
echo "models=[$models]" >> $GITHUB_OUTPUT
translate:
needs: list-models
runs-on: ubuntu-latest
strategy:
matrix:
model: ${{ fromJson(needs.list-models.outputs.models) }}
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: Upload and Translate
run: |
BUCKET="matrix-${{ github.run_id }}"
raps bucket create $BUCKET --retention transient || true
raps object upload $BUCKET "models/${{ matrix.model }}"
URN=$(raps object urn $BUCKET "${{ matrix.model }}" --quiet)
raps translate start "$URN" --format svf2 --wait
Scheduled Maintenance
Run periodic APS maintenance tasks:
name: Weekly Cleanup
on:
schedule:
- cron: '0 2 * * 0' # Every Sunday at 2 AM
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: List Old Buckets
run: |
raps bucket list --output json | jq -r '.[] |
select(.createdDate < (now - 7*24*60*60 | strftime("%Y-%m-%dT%H:%M:%S"))) |
.bucketKey'
- name: Delete Transient Buckets
run: |
raps bucket list --output json | jq -r '.[] |
select(.policyKey == "transient") |
.bucketKey' | while read bucket; do
echo "Deleting $bucket..."
raps bucket delete "$bucket" --yes || true
done
Pull Request Validation
Validate models before merging:
name: PR Validation
on:
pull_request:
paths:
- 'models/**'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: Validate Models
id: validate
run: |
BUCKET="pr-${{ github.event.pull_request.number }}"
raps bucket create $BUCKET --retention transient
failed=0
for file in $(git diff --name-only origin/main...HEAD -- 'models/*.rvt'); do
if [ -f "$file" ]; then
echo "Validating $file..."
raps object upload $BUCKET "$file"
URN=$(raps object urn $BUCKET "$(basename $file)" --quiet)
if ! raps translate start "$URN" --format svf2 --wait; then
echo "::error::Translation failed for $file"
failed=1
fi
fi
done
raps bucket delete $BUCKET --yes || true
exit $failed
- name: Comment on PR
if: failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'β Model translation validation failed. Please check the workflow logs.'
})
Export Translation Results
Save translation outputs as artifacts:
name: Export Derivatives
on:
workflow_dispatch:
inputs:
model:
description: 'Model filename'
required: true
jobs:
export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: Translate and Download
run: |
BUCKET="export-${{ github.run_id }}"
MODEL="${{ github.event.inputs.model }}"
raps bucket create $BUCKET --retention transient
raps object upload $BUCKET "models/$MODEL"
URN=$(raps object urn $BUCKET "$MODEL" --quiet)
raps translate start "$URN" --format obj --wait
mkdir -p output
raps translate download "$URN" --output-dir output/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: derivatives-${{ github.event.inputs.model }}
path: output/
retention-days: 7
Cross-Platform Support
RAPS Action works on all GitHub-hosted runners:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
- name: Test
run: raps auth test
Caching (Optional)
Speed up workflows by caching the RAPS binary:
- name: Cache RAPS
uses: actions/cache@v4
with:
path: ~/.cargo/bin/raps
key: raps-${{ runner.os }}-4.16.0
- name: Setup RAPS
uses: dmytro-yemelianov/raps-actions/setup@v1
with:
version: '4.16.0'
client-id: ${{ secrets.APS_CLIENT_ID }}
client-secret: ${{ secrets.APS_CLIENT_SECRET }}
Debugging Workflows
Enable Debug Output
- name: Debug API Calls
run: raps bucket list --debug
env:
APS_CLIENT_ID: ${{ secrets.APS_CLIENT_ID }}
APS_CLIENT_SECRET: ${{ secrets.APS_CLIENT_SECRET }}
Check Authentication
- name: Check Auth
run: |
raps auth test
raps auth status
env:
APS_CLIENT_ID: ${{ secrets.APS_CLIENT_ID }}
APS_CLIENT_SECRET: ${{ secrets.APS_CLIENT_SECRET }}
Security Best Practices
- Use Secrets β Never hardcode credentials in workflows
- Limit Permissions β Use minimal scopes for your APS app
- Review Actions β Pin action versions with SHA hashes for security
- Cleanup Resources β Delete temporary buckets after use
# Pin by SHA for security
- uses: dmytro-yemelianov/raps-actions/setup@abc123def456...
# Always cleanup
- name: Cleanup
if: always()
run: raps bucket delete $BUCKET --yes || true
Related Documentation
- CLI Mode β CommandβΆοΈCommandInstruction executed by a CLI tool.View in glossary-line reference
- Exit Codes β Understanding exit codes
- Pipelines β YAML-based automationπ€AutomationReplacing manual processes with software.View in glossary
- raps-actions Repository β Official GitHub Actions and GitLab CI templates