Skip to content

Commit

Permalink
ci: extract awscli-setup action
Browse files Browse the repository at this point in the history
  • Loading branch information
rosado committed Jul 26, 2024
1 parent eca56ce commit 1919dc4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
22 changes: 22 additions & 0 deletions .github/actions/awscli-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: AWS CLI setup
description: Installs AWS CLI tools
inputs:
file-url:
required: false
default: 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip'
include-rsync: 'Should also install rsync?'
required: false
default: true
runs:
using: 'composite'
steps:
- id: install-awscli
run: |
curl --silent "$INPUT-FILE_URL" -o "awscli.zip"
unzip -q awscli.zip
sudo ./aws/install --update
- id: install-rsync
if: {{ inputs.include-rsync }}
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y rsync
9 changes: 2 additions & 7 deletions .github/workflows/deploy-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- id: install-awscli
run: |
curl --silent "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
sudo apt-get -qq update
sudo apt-get -qq install -y rsync
- name: Install AWS CLI
uses: ./.github/actions/awscli-setup
- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- id: install-awscli
run: |
curl --silent "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install --update
sudo apt-get -qq update
sudo apt-get -qq install -y rsync
- name: Install AWS CLI
uses: ./.github/actions/awscli-setup
- name: Setup Node
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 1919dc4

Please sign in to comment.