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 18, 2022
1 parent f075b96 commit bf40841
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .github/actions/config-scrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ outputs:
description: ""
commiter_username:
description: ""
deploy_tag:
description: ""
deploy_tags:
description: ""
event:
description: ""
environment:
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.

4 changes: 4 additions & 0 deletions src/actions/config-scrapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ outputs:
description: ""
commiter_username:
description: ""
deploy_tag:
description: ""
deploy_tags:
description: ""
event:
description: ""
environment:
Expand Down
16 changes: 8 additions & 8 deletions src/actions/config-scrapper/src/deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ module.exports = async (analysis) => {
analysis.outputs.environment = analysis.environment
}

let tag = `c-${commitSha}`
let tag = `${imageFullName}:c-${commitSha}`
let tags = [
`latest`,
`r-${github.context.runNumber}`,
`c-${commitSha}`,
`r-${github.context.runNumber}`,
`b-${github.context.ref.replace('refs/heads/', '').replace('/', '-')}`,
`u-${github.context.actor}`,
]

if (environment) {
tag = `e-${environment}-c-${commitSha}`
tag = `${imageFullName}:e-${environment}-c-${commitSha}`
tags = tags.concat([
`e-${environment}-latest`,
`e-${environment}-r-${github.context.runNumber}`,
Expand All @@ -43,14 +43,14 @@ module.exports = async (analysis) => {

if (committedAt) {
tags = tags.concat([
`d-${committedAt.toISOString().substring(0,10)}`,
`t-${committedAt.getTime()}`,
`d-${committedAt.toISOString().substring(0,10)}`,
])

if (environment) {
tags = tags.concat([
`e-${environment}-d-${committedAt.toISOString().substring(0,10)}`,
`e-${environment}-t-${committedAt.getTime()}`,
`e-${environment}-d-${committedAt.toISOString().substring(0,10)}`,
])
}
}
Expand All @@ -59,10 +59,10 @@ module.exports = async (analysis) => {

analysis.deployment.tag = tag
analysis.deployment.tags = tags
analysis.deployment.tagsString = tags.join(',')
analysis.deployment.tagsString = tags.join(', ')

// outputs
analysis.outputs.event = analysis.event
analysis.outputs.tag = analysis.deployment.tag
analysis.outputs.tags = analysis.deployment.tagsString
analysis.outputs.deploy_tag = analysis.deployment.tag
analysis.outputs.deploy_tags = analysis.deployment.tagsString
}

0 comments on commit bf40841

Please sign in to comment.