update readme for cli to demonstrate typical use of --poll argument #243
Workflow file for this run
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: Build Testflinger CLI | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths: | |
| - cli/** | |
| - .github/workflows/cli-publish-snap.yml | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - cli/** | |
| - .github/workflows/cli-publish-snap.yml | |
| workflow_dispatch: | |
| inputs: | |
| publish: | |
| description: Publish the snap to the store | |
| required: false | |
| default: false | |
| type: boolean | |
| release: | |
| description: The release channel to publish to | |
| required: false | |
| default: edge | |
| type: choice | |
| options: | |
| - beta | |
| - edge | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| snap: | |
| name: Snap | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Build snap | |
| id: build | |
| uses: snapcore/action-build@3bdaa03e1ba6bf59a65f84a751d943d549a54e79 # v1 | |
| with: | |
| path: cli | |
| - name: Upload snapcraft logs | |
| if: failure() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: runtime-build-log | |
| path: | | |
| /home/runner/.cache/snapcraft/log/ | |
| /home/runner/.local/state/snapcraft/log/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: testflinger-cli.snap | |
| path: ${{ steps.build.outputs.snap }} | |
| - name: Publish snap | |
| if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' }} | |
| uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40 # v1 | |
| env: | |
| SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} | |
| with: | |
| snap: ${{ steps.build.outputs.snap }} | |
| release: ${{ github.event_name == 'push' && 'beta' || github.event.inputs.release }} |