Skip to content

Commit

Permalink
fix: empty commit for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Filipe Forattini committed Jul 12, 2022
1 parent 600c2c5 commit 258bf0e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 19 deletions.
14 changes: 8 additions & 6 deletions .github/actions/config-scrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ inputs:
outputs:
actor:
description: ""
language:
commiter_name:
description: ""
commiter_email:
description: ""
commiter_username:
description: ""
event:
description: ""
environment:
description: ""
feature_has_dockerfile:
description: ""
feature_has_dockerignore:
description: ""
feature_has_releaserc:
description: ""
commiter_name:
description: ""
commiter_email:
description: ""
commiter_username:
language:
description: ""

runs:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/config-scrapper/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/actions/config-scrapper/index.js.map

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions .github/workflows/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:

outputs:
Analysis: ${{ steps.analysis.outputs.result }}
Environment: ${{ steps.analysis.outputs.environment }}
Event: ${{ steps.analysis.outputs.event }}

steps:
Expand Down Expand Up @@ -170,7 +171,6 @@ jobs:
Trigger:
runs-on: ubuntu-latest
if: github.event_name == 'push'
environment: dev

needs:
- Setup
Expand Down Expand Up @@ -210,7 +210,7 @@ jobs:
Build:
runs-on: ubuntu-latest
if: github.event_name == 'deployment'
environment: dev
environment: needs.Setup.outputs.Environment

needs:
- Setup
Expand All @@ -222,7 +222,6 @@ jobs:
uses: actions/checkout@v3
with:
ref: env/dev
path: .pipeline

- name: Setup | Dependencies
uses: filipeforattini/ff-iac-github-actions/.github/actions/setup-binaries@main
Expand Down
14 changes: 8 additions & 6 deletions src/actions/config-scrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,23 @@ inputs:
outputs:
actor:
description: ""
language:
commiter_name:
description: ""
commiter_email:
description: ""
commiter_username:
description: ""
event:
description: ""
environment:
description: ""
feature_has_dockerfile:
description: ""
feature_has_dockerignore:
description: ""
feature_has_releaserc:
description: ""
commiter_name:
description: ""
commiter_email:
description: ""
commiter_username:
language:
description: ""

runs:
Expand Down
1 change: 1 addition & 0 deletions src/actions/config-scrapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ async function action() {
analysis.outputs.actor = github.context.actor

await scrappers.code(analysis);
await scrappers.deployment(analysis);
await scrappers.git(analysis);
await scrappers.repository(analysis);
await scrappers.run(analysis);
Expand Down
4 changes: 2 additions & 2 deletions src/actions/config-scrapper/src/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const linguist = require("linguist-js");

module.exports = async (analysis) => {
const { languages } = await linguist(analysis.root, {
categories: ["programming"],
ignoredLanguages: ["Shell", "Dockerfile"],
categories: [ "programming" ],
ignoredLanguages: [ "Shell", "Dockerfile" ],
});

let langIterator = _.mapValues(languages.results, "bytes");
Expand Down
10 changes: 10 additions & 0 deletions src/actions/config-scrapper/src/deployment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const core = require("@actions/core");
const github = require("@actions/github");

module.exports = async (analysis) => {
if (github.context.payload.deployment) {
analysis.environment = github.context.payload.deployment.environment
}

analysis.outputs.environment = analysis.environment
}
1 change: 1 addition & 0 deletions src/actions/config-scrapper/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = {
code: require('./code'),
deployment: require('./deployment'),
git: require('./git'),
repository: require('./repository'),
run: require('./run'),
Expand Down

0 comments on commit 258bf0e

Please sign in to comment.