Skip to content

Commit

Permalink
Support running action in container (#6)
Browse files Browse the repository at this point in the history
* Test action in container

* Fix for container runner

* Install curl

* Test with cypress/browsers

* Install unzip

* Remove sudo

* Install sudo

* Try debian

* Show version in test
  • Loading branch information
int128 authored Mar 23, 2023
1 parent bdf8cb4 commit f9d5184
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,30 @@ on:
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
14 changes: 14 additions & 0 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: setup-aws-cli
description: setup aws-cli v2
runs:
using: composite
steps:
# https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html
- shell: bash
run: |
set -eux
cd "$(mktemp -d)"
curl -sf 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o awscliv2.zip
unzip -q awscliv2.zip
sudo ./aws/install --update
aws --version
7 changes: 0 additions & 7 deletions action.yml

This file was deleted.

11 changes: 0 additions & 11 deletions run.sh

This file was deleted.

0 comments on commit f9d5184

Please sign in to comment.