update workflow #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |