Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Feb 28, 2020
1 parent c67ee11 commit 728751c
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 2,743 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/example.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ jobs:
run: |
npm i
npm test
env:
CI: true
- name: Install Terraform
uses: little-core-labs/little-core-labs@master

61 changes: 0 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,61 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Bret Comnes
Copyright (c) 2020 Little Core Labs and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
26 changes: 10 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# cleanup-xvfb
Clean up any remaining xvfb processes leftover in a Github Action.
# install-terraform
Install Terraform to a Github Actions job environment.

<a href="https://github.com/bcomnes/cleanup-xvfb"><img alt="GitHub Actions status" src="https://github.com/bcomnes/cleanup-xvfb/workflows/Tests/badge.svg"></a>
<a href="https://github.com/little-core-labs/install-terraform"><img alt="GitHub Actions status" src="https://github.com/little-core-labs/install-terraform/workflows/Tests/badge.svg"></a>


## Usage
Expand All @@ -12,7 +12,7 @@ Create a workflow `.yml` file in your repositories `.github/workflows` directory

### Inputs

None.
- `version`: The version of terraform to install. Default: 0.12.21

### Outputs

Expand All @@ -36,19 +36,13 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: sudo apt-get install xvfb
- name: npm install, build, and test
- name: Install Terraform
uses: little-core-labs/install-terraform@v1
- name: Terraform apply
run: |
npm i
xvfb-run --auto-servernum npm test
env:
CI: true
- name: Cleanup xvfb pidx
uses: bcomnes/cleanup-xvfb@v1
terraform init
terraform plan
terraform apply -auto-approve
```

## Contributing
Expand Down
14 changes: 10 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: 'Cleanup xvfb'
description: 'Cleanup any lingering xvfb pids'
name: 'Install Terraform'
description: 'Installs any version of terraform to the current job environment'
branding:
icon: monitor
color: yellow
icon: type
color: purple
runs:
using: 'node12'
main: 'index.js'
inputs:
version:
description: 'Version of terraform to download'
required: false
default: 0.12.21
outputs: # none
13 changes: 0 additions & 13 deletions cleanup-xvfb.sh

This file was deleted.

38 changes: 0 additions & 38 deletions example.js

This file was deleted.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const exec = require('child_process').exec
const path = require('path')

const scriptPath = path.resolve(__dirname, 'cleanup-xvfb.sh')
const scriptPath = path.resolve(__dirname, 'run.sh')

exec(`sh ${scriptPath}`, (error, stdout, stderr) => {
console.log(stdout)
Expand Down
Loading

0 comments on commit 728751c

Please sign in to comment.