-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempt fix EB CLI with custom install (#96)
customize the EB CLI installation using a modified action from install-eb-cli-action[1] to work around issue aws/aws-elastic-beanstalk-cli-setup#148 The idea is to install a specific version of python with a specific version of EB CLI to make a compatible pair. [1] https://github.com/sparkplug-app/install-eb-cli-action
- Loading branch information
Showing
2 changed files
with
43 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# This script is copied from https://github.com/sparkplug-app/install-eb-cli-action to allow us | ||
# to use a customize EB CLI install to work around issue https://github.com/aws/aws-elastic-beanstalk-cli-setup/issues/148 | ||
# This allows us to use a specific version of python with a specific version of the EB CLI | ||
name: Install EB CLI | ||
description: Installs the Elastic Beanstalk CLI to the GitHub Actions runner | ||
inputs: | ||
version: | ||
description: Version of the EB CLI that will be installed (such as 3.20.3). Will default to latest if not specified. | ||
required: false | ||
python-version: | ||
description: Version of python for the EB CLI | ||
required: false | ||
default: 3.x | ||
type: string | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: 'aws/aws-elastic-beanstalk-cli-setup' | ||
path: 'aws-elastic-beanstalk-cli-setup' | ||
branch: 'master' | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{inputs.python-version}} | ||
|
||
- run: pipx install virtualenv | ||
shell: bash | ||
|
||
- name: Install latest EB CLI version | ||
if: "${{ inputs.version == '' }}" | ||
run: python $GITHUB_WORKSPACE/aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py | ||
shell: bash | ||
|
||
- name: Install specific EB CLI version | ||
if: "${{ inputs.version != '' }}" | ||
run: python $GITHUB_WORKSPACE/aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py --version ${{ inputs.version }} | ||
shell: bash | ||
|
||
- run: echo "~/.ebcli-virtual-env/executables" >> $GITHUB_PATH | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,14 +39,10 @@ jobs: | |
role-to-assume: ${{ inputs.role-to-assume }} | ||
role-session-name: GHA-${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }} | ||
role-duration-seconds: ${{ inputs.role-duration-seconds }} | ||
# install specific version of python and EBCLI as a workaround for https://github.com/aws/aws-elastic-beanstalk-cli-setup/issues/148 | ||
- name: Install python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Install EB CLI | ||
uses: sparkplug-app/install-eb-cli[email protected] | ||
uses: "./.github/actions/install-eb-cli" | ||
with: | ||
version: 3.19.4 | ||
python-version: 3.8 | ||
- name: Deploy to Beanstalk | ||
run: ${{ inputs.ebcli-command }} |