Skip to content

Commit

Permalink
feat: initial action
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielrufino committed Jul 28, 2024
1 parent 065396c commit 4b57e20
Show file tree
Hide file tree
Showing 5 changed files with 305 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI

on:
- pull_request
- push
- workflow_dispatch

jobs:
node-ci:
name: Node CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gabrielrufino/node-ci@v3
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Should not fail
id: should-not-fail
uses: ./
with:
module: 'internet'
method: 'email'
- uses: gabrielrufino/expect-action@develop
with:
type: 'regex'
value: ${{ steps.should-not-fail.outputs.value }}
pattern: '^-?\d+$'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
253 changes: 253 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
"private": true,
"version": "1.0.0",
"main": "src/index.js",
"scripts": {
"test": "jest"
},
"scripts": {},
"author": "Gabriel Rufino <[email protected]>",
"license": "UNLICENSED"
"license": "UNLICENSED",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0"
}
}
15 changes: 15 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const core = require('@actions/core');

try {
const module = core.getInput('module')
const method = core.getInput('method')

console.log({
module,
method,
})

core.setOutput('value', '[email protected]')
} catch (error) {
core.setFailed(error.message);
}

0 comments on commit 4b57e20

Please sign in to comment.