Skip installation if aws command is available #19
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: test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| when-aws-cli-does-not-exist: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # delete preexisting one | |
| - run: sudo rm -fr /usr/local/aws-cli | |
| - uses: ./ | |
| - run: aws --version | |
| when-aws-cli-already-exists: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: ./ | |
| - run: aws --version | |
| in-container: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| container: | |
| image: debian:stable | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - run: apt-get update | |
| - run: apt-get install -y sudo unzip curl | |
| - uses: ./ | |
| - run: aws --version |