Skip to content

Commit

Permalink
Docs and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
stv-io committed Nov 15, 2023
1 parent 2cdbdc2 commit 1ca7aaa
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 388 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# action-tfswitch

A github action to run tfswitch as a composite action

## Usage

To use tfswtich github action, configure a YAML workflow file, e.g.
`.github/workflows/tfswitch.yml`, with the following:

```yaml
name: Run terraform
on:
- pull_request
jobs:
terraform:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Render terraform docs inside the README.md and push changes back to PR branch
uses: stv-io/action-tfswitch@main
- name: Render terraform docs inside the README.md and push changes back to PR branch
run: |
export TF_VERSION=1.6.1
tfswitch 1.6.2
terraform --version
```
8 changes: 1 addition & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: 'tfswitch'

description: 'Setup tfswitch to install a specific version of terraform'

inputs:
version:
description: 'The tfswitch version'
required: false
default: "0.13.1308"

runs:
using: composite
steps:
Expand All @@ -27,7 +21,7 @@ runs:
chmod 755 install.sh
echo "Creating $HOME/.bin for tfswitch binary .."
mkdir -p $HOME/.bin
echo "Installing tfswitch version ${{ inputs.version }} .."
echo "Installing tfswitch version .."
./install.sh -b $HOME/.bin
echo "Running tfswitch from $HOME/.bin .."
$HOME/.bin/tfswitch --version
Expand Down
Loading

0 comments on commit 1ca7aaa

Please sign in to comment.