Skip to content

Commit

Permalink
workflow:feat - Automating the release body
Browse files Browse the repository at this point in the history
In this PR I'll update Release Beta, RC and Final to set automatic
body in release notes. I changed file release-new.yml to
release-final.yml and I changed file alpha.yml to release-alpha.yml

Signed-off-by: Wilian Gabriel <wilian.silva@zup.com.br>
  • Loading branch information
wiliansilvazup committed Feb 21, 2022
1 parent f860773 commit e85d19d
Show file tree
Hide file tree
Showing 20 changed files with 120 additions and 89 deletions.
3 changes: 1 addition & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# GitHub code owners
# See https://github.com/blog/2392-introducing-code-owners
* @wiliansilvazup @matheusalcantarazup @lucasbrunozup @nathanmartinszup @iancardosozup

* @wiliansilvazup @matheusalcantarazup @lucasbrunozup @nathanmartinszup @iancardosozup @oliveirafelipezup
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: alpha
name: release-alpha
on:
push:
branches:
- main
permissions: read-all
jobs:
Alpha:
ReleaseAlpha:
permissions:
contents: write
packages: write
issues: write
runs-on: ubuntu-latest
env:
COSIGN_KEY_LOCATION: /tmp/cosign.key
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -84,12 +84,12 @@ jobs:
push: true
context: .
file: ./deployments/Dockerfile
tags: horuszup/horusec-cli:alpha
tags: wiliansilvazup/horusec-cli:alpha
platforms: linux/amd64,linux/arm64

- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-cli:alpha
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-cli:alpha
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}

Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
## Docker images
- `docker pull horuszup/horusec-cli:alpha`
- `docker pull wiliansilvazup/horusec-cli:alpha`
files: |
./dist/checksums.txt
./dist/checksums.txt.sig
Expand All @@ -154,7 +154,6 @@ jobs:
./dist/horusec_windows_arm64/horusec_win_arm64.exe.sig
./dist/horusec_darwin_arm64/horusec_mac_arm64
./dist/horusec_darwin_arm64/horusec_mac_arm64.sig
./dist/horusec-standalone_linux_amd64/horusec_linux_amd64_stand_alone
./dist/horusec-standalone_linux_amd64/horusec_linux_amd64_stand_alone.sig
./dist/horusec-standalone_linux_386/horusec_linux_x86_stand_alone
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ on:
required: true
permissions: read-all
jobs:
Beta:
ReleaseBeta:
permissions:
contents: write
packages: write
issues: write
runs-on: ubuntu-latest
env:
COSIGN_KEY_LOCATION: /tmp/cosign.key
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}

if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor)
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -95,6 +96,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
GORELEASER_CURRENT_TAG: ${{ steps.updated-version.outputs.nextBetaVersion }}
GORELEASER_PREVIOUS_TAG: ${{ steps.updated-version.outputs.actualBetaVersion }}
CURRENT_DATE: ${{ steps.date.outputs.date }}
CLI_VERSION: ${{ steps.updated-version.outputs.nextBetaVersion }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: release-new
name: release-final
on:
workflow_dispatch:
inputs:
Expand All @@ -20,16 +20,16 @@ on:
required: true
permissions: read-all
jobs:
NewRelease:
ReleaseFinal:
permissions:
contents: write
packages: write
issues: write
runs-on: ubuntu-latest
env:
COSIGN_KEY_LOCATION: /tmp/cosign.key
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}


if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor)
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -87,6 +87,9 @@ jobs:
- name: Create local tag
run: mage -v createLocalTag ${{ steps.updated-version.outputs.nextReleaseVersion }}

- name: Push tag
run: git push --tags

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
Expand All @@ -97,6 +100,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
GORELEASER_CURRENT_TAG: ${{ steps.updated-version.outputs.nextReleaseVersion }}
GORELEASER_PREVIOUS_TAG: ${{ steps.updated-version.outputs.actualReleaseVersion }}
CURRENT_DATE: ${{ steps.date.outputs.date }}
CLI_VERSION: ${{ steps.updated-version.outputs.nextReleaseVersion }}

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ on:
required: true
permissions: read-all
jobs:
Rc:
ReleaseRc:
permissions:
contents: write
packages: write
issues: write
runs-on: ubuntu-latest
env:
COSIGN_KEY_LOCATION: /tmp/cosign.key
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}


if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor)
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
HORUSEC_REPOSITORY_NAME: ${{ github.event.repository.name }}
- name: Checkout release branch
run: mage -v checkoutReleaseBranch ${{ steps.updated-version.outputs.nextReleaseBranchName }}

- name: Create local tag
run: mage -v createLocalTag ${{ steps.updated-version.outputs.nextRCVersion }}

Expand All @@ -96,6 +96,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
GORELEASER_CURRENT_TAG: ${{ steps.updated-version.outputs.nextRCVersion }}
GORELEASER_PREVIOUS_TAG: ${{ steps.updated-version.outputs.actualRCVersion }}
CURRENT_DATE: ${{ steps.date.outputs.date }}
CLI_VERSION: ${{ steps.updated-version.outputs.nextRCVersion }}

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/c/deployments/Dockerfile
tags: |
horuszup/horusec-c:${{ github.event.inputs.version }}
horuszup/horusec-c:latest
wiliansilvazup/horusec-c:${{ github.event.inputs.version }}
wiliansilvazup/horusec-c:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-c:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-c:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-c:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-c:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/csharp/deployments/Dockerfile
tags: |
horuszup/horusec-csharp:${{ github.event.inputs.version }}
horuszup/horusec-csharp:latest
wiliansilvazup/horusec-csharp:${{ github.event.inputs.version }}
wiliansilvazup/horusec-csharp:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-csharp:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-csharp:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-csharp:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-csharp:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-elixir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/elixir/deployments/Dockerfile
tags: |
horuszup/horusec-elixir:${{ github.event.inputs.version }}
horuszup/horusec-elixir:latest
wiliansilvazup/horusec-elixir:${{ github.event.inputs.version }}
wiliansilvazup/horusec-elixir:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-elixir:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-elixir:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-elixir:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-elixir:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/generic/deployments/Dockerfile
tags: |
horuszup/horusec-generic:${{ github.event.inputs.version }}
horuszup/horusec-generic:latest
wiliansilvazup/horusec-generic:${{ github.event.inputs.version }}
wiliansilvazup/horusec-generic:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-generic:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-generic:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-generic:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-generic:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/go/deployments/Dockerfile
tags: |
horuszup/horusec-go:${{ github.event.inputs.version }}
horuszup/horusec-go:latest
wiliansilvazup/horusec-go:${{ github.event.inputs.version }}
wiliansilvazup/horusec-go:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-go:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-go:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-go:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-go:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-hcl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/hcl/deployments/Dockerfile
tags: |
horuszup/horusec-hcl:${{ github.event.inputs.version }}
horuszup/horusec-hcl:latest
wiliansilvazup/horusec-hcl:${{ github.event.inputs.version }}
wiliansilvazup/horusec-hcl:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-hcl:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-hcl:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-hcl:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-hcl:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/javascript/deployments/Dockerfile
tags: |
horuszup/horusec-js:${{ github.event.inputs.version }}
horuszup/horusec-js:latest
wiliansilvazup/horusec-js:${{ github.event.inputs.version }}
wiliansilvazup/horusec-js:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-js:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-js:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-js:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-js:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-leaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/leaks/deployments/Dockerfile
tags: |
horuszup/horusec-leaks:${{ github.event.inputs.version }}
horuszup/horusec-leaks:latest
wiliansilvazup/horusec-leaks:${{ github.event.inputs.version }}
wiliansilvazup/horusec-leaks:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-leaks:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-leaks:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-leaks:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-leaks:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/php/deployments/Dockerfile
tags: |
horuszup/horusec-php:${{ github.event.inputs.version }}
horuszup/horusec-php:latest
wiliansilvazup/horusec-php:${{ github.event.inputs.version }}
wiliansilvazup/horusec-php:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-php:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-php:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-php:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-php:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/python/deployments/Dockerfile
tags: |
horuszup/horusec-python:${{ github.event.inputs.version }}
horuszup/horusec-python:latest
wiliansilvazup/horusec-python:${{ github.event.inputs.version }}
wiliansilvazup/horusec-python:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-python:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-python:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-python:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-python:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/ruby/deployments/Dockerfile
tags: |
horuszup/horusec-ruby:${{ github.event.inputs.version }}
horuszup/horusec-ruby:latest
wiliansilvazup/horusec-ruby:${{ github.event.inputs.version }}
wiliansilvazup/horusec-ruby:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-ruby:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-ruby:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-ruby:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-ruby:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
8 changes: 4 additions & 4 deletions .github/workflows/update-horusec-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
context: .
file: ./internal/services/formatters/shell/deployments/Dockerfile
tags: |
horuszup/horusec-shell:${{ github.event.inputs.version }}
horuszup/horusec-shell:latest
wiliansilvazup/horusec-shell:${{ github.event.inputs.version }}
wiliansilvazup/horusec-shell:latest
- name: Sign image
run: |
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-shell:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-shell:latest
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-shell:${{ github.event.inputs.version }}
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-shell:latest
env:
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }}
2 changes: 1 addition & 1 deletion deployments/Dockerfile-gorelease-amd64
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM horuszup/docker-amd64:20.10-git
FROM wiliansilvazup/docker-amd64:20.10-git

COPY /horusec_linux_amd64 /usr/local/bin/horusec

Expand Down
2 changes: 1 addition & 1 deletion deployments/Dockerfile-gorelease-arm64
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM horuszup/docker-arm64:20.10-git
FROM wiliansilvazup/docker-arm64:20.10-git

COPY /horusec_linux_arm64 /usr/local/bin/horusec

Expand Down
Loading

0 comments on commit e85d19d

Please sign in to comment.