diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8a43674 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,58 @@ +name: 'GitHub Drives Example: seed and consume a Drive test' + +on: + push: + workflow_dispatch: + inputs: + driveName: + description: "Drive name" + required: false + +permissions: + contents: read + + +jobs: + seed-drive: + runs-on: ubuntu-latest + + steps: + + - name: Checkout Drive + id: checkout-drive + uses: github/github-drives/checkout@v0.1.0 + with: + drive-name: "default" + path: "drive" # optional; relative to $GITHUB_WORKSPACE + + - name: Check out repo + uses: actions/checkout@v4 + with: + ref: ${{ github.ref }} + + - name: Commit Drive + uses: github/github-drives/commit@v0.1.0 + with: + drive-name: "default" + path: "drive" # must match checkout + + - name: Log Drive Commit Results + run: | + echo "Commit output: ${{ toJSON(steps.commit-drive.outputs) }}" + consume-drive: + runs-on: ubuntu-latest + needs: seed-drive + + steps: + + - name: Checkout Drive + id: checkout-drive + uses: github/github-drives/checkout@v0.1.0 + with: + drive-name: "default" + + - name: Log Drive Checkout Result + run: | + echo "Checkout output: ${{ toJSON(steps.checkout-drive.outputs) }}" + - name: List workspace contents + run: ls -la \ No newline at end of file