-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Filipe Forattini
committed
Jul 17, 2022
1 parent
faab5c4
commit 5b37a0d
Showing
12 changed files
with
615 additions
and
17 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
const github = require("@actions/github"); | ||
|
||
module.exports = async (analysis) => { | ||
let containerRegistry = core.getInput('containerRegistry', { required: true }); | ||
|
||
if (github.context.payload.deployment) { | ||
analysis.environment = github.context.payload.deployment.environment | ||
analysis.outputs.environment = analysis.environment | ||
} | ||
|
||
analysis.deployment.tags = [ | ||
`${imageFullname}:latest`, | ||
`${imageFullname}:d-${this.output.run.date}`, | ||
`${imageFullname}:r-${this.output.run.count}`, | ||
`${imageFullname}:t-${this.output.run.startTimestamp}`, | ||
`${imageFullname}:b-${this.output.git.branch.replace('/', '-')}`, | ||
`${imageFullname}:c-${this.output.git.commit}`, | ||
// `${imageFullName}:node-${matrix.node-version}`, | ||
// `${imageFullName}:node-${matrix.node-version}-latest`, | ||
// `${imageFullName}:node-${matrix.node-version}-d-${needs.Setup.outputs.Date}`, | ||
// `${imageFullName}:node-${matrix.node-version}-b-${needs.Setup.outputs.Branch}`, | ||
// `${imageFullName}:node-${matrix.node-version}-c-${needs.Setup.outputs.ShaHash}`, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: 'Static code analysis' | ||
description: 'Greet someone' | ||
|
||
inputs: | ||
environment: | ||
description: 'Environment target' | ||
required: false | ||
default: 'dev' | ||
cached: | ||
description: 'Inform the main repository language' | ||
required: false | ||
default: 'true' | ||
platforms: | ||
description: "Multi plataform container builds" | ||
required: false | ||
default: "linux/386,linux/amd64,linux/arm/v7,linux/arm/v8,linux/arm64,linux/ppc64le,linux/s390x" | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Pipeline config scrapper | ||
id: analysis | ||
uses: filipeforattini/ff-iac-github-actions/.github/actions/config-scrapper@main | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
if: inputs.cached == 'false' | ||
with: | ||
context: . | ||
push: true | ||
platforms: ${{ inputs.platforms }} | ||
build-args: ${{steps.node_setup.outputs.docker_image_args}} | ||
tags: ${{steps.node_setup.outputs.docker_image_tags}}, ${{steps.node_setup.outputs.docker_image_fullname}}:${{needs.Release.outputs.Version}} | ||
labels: "organization: ${{github.repository_owner}}, repository: ${{github.repository}}, branch: ${{needs.Setup.outputs.Branch}}, commit: ${{needs.Setup.outputs.ShaHash}}, date: ${{needs.Setup.outputs.Date}}, timestamp: ${{needs.Setup.outputs.Timestamp}}" | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v2 | ||
if: inputs.cached == 'true' | ||
with: | ||
context: . | ||
push: true | ||
platforms: ${{ inputs.platforms }} | ||
build-args: ${{steps.node_setup.outputs.docker_image_args}} | ||
tags: ${{steps.node_setup.outputs.docker_image_tags}}, ${{steps.node_setup.outputs.docker_image_fullname}}:${{needs.Release.outputs.Version}} | ||
labels: "organization: ${{github.repository_owner}}, repository: ${{github.repository}}, branch: ${{needs.Setup.outputs.Branch}}, commit: ${{needs.Setup.outputs.ShaHash}}, date: ${{needs.Setup.outputs.Date}}, timestamp: ${{needs.Setup.outputs.Timestamp}}" | ||
cache-from: type=local,src=/tmp/.buildx-cache | ||
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new |
Large diffs are not rendered by default.
Oops, something went wrong.