name: Test dependency-submission save

on:
  workflow_dispatch:
  push:

permissions:
  contents: read

jobs:
  dependency-submission-save:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout sources
      uses: actions/checkout@v4
    - name: Initialize integ-test
      uses: ./.github/actions/init-integ-test

    - name: Generate and save dependency graph
      uses: ./dependency-submission
      with:
        build-root-directory: .github/workflow-samples/groovy-dsl
        dependency-graph: generate-and-upload
      env:
        GITHUB_DEPENDENCY_GRAPH_REF: 'refs/tags/v0.0.1' # Use a different ref to avoid updating the real dependency graph for the repository
