Skip to content

Commit

Permalink
Move actionTest directory contents to root.
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKiazyk committed Dec 9, 2020
1 parent 6923b2f commit 8740e2e
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ __tests__/runner/*
lib/**/*

# For local action testing, these hold the secrets needed for testing.
actiontest/.secrets
.secrets
File renamed without changes.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ Install the dependencies
```bash
$ npm install
```
1. Install the dependencies `npm install`
2. Install Docker Desktop https://www.docker.com/products/docker-desktop
3. Install ACT - https://github.com/nektos/act
4. Copy .secrets-example to .secrets and replace `xxxx` with real values
5. Run `npm run act`

Couple of things:

- need to use the `ubuntu-latest=nektos/act-environments-ubuntu:18.04` docker image which is 18 GB!
- `test` - the name of your job from the `.github/workflows/test.yml` file
- `--secret-file .secrets` is a list of secrets that the docker image uses in replacement of github secrets. Set these locally and do not check in
- `--env-file .environment` this simply adds in a `ACT=true`. This can be removed once https://github.com/nektos/act/pull/417 is released. Act v > 0.2.17

Build the typescript and package it for distribution

Expand Down
12 changes: 0 additions & 12 deletions actiontest/readme.md

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "TypeScript template action",
"main": "lib/main.js",
"scripts": {
"act": "act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -j test --secret-file actiontest/.secrets --env-file actiontest/.environment",
"act": "act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04 -j test --secret-file .secrets --env-file .environment",
"build": "tsc",
"format": "prettier --write **/*.ts",
"format-check": "prettier --check **/*.ts",
Expand Down

0 comments on commit 8740e2e

Please sign in to comment.