-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow:feat - Automating the release notes
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 <[email protected]>
- Loading branch information
1 parent
8d7f2de
commit 467b11f
Showing
10 changed files
with
167 additions
and
151 deletions.
There are no files selected for viewing
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,4 +1,4 @@ | ||
# GitHub code owners | ||
# See https://github.com/blog/2392-introducing-code-owners | ||
* @wiliansilvazup @lucasbrunozup @nathanmartinszup @iancardosozup @matheusalcantarazup | ||
* @wiliansilvazup @lucasbrunozup @nathanmartinszup @iancardosozup @matheusalcantarazup @oliveirafelipezup | ||
|
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 |
---|---|---|
|
@@ -12,18 +12,19 @@ | |
# 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 | ||
|
@@ -62,11 +63,11 @@ jobs: | |
push: true | ||
context: ./api | ||
file: ./api/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-api:alpha | ||
tags: wiliansilvazup/horusec-api:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-api:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-api:alpha | ||
env: | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }} | ||
- name: Build and push auth | ||
|
@@ -75,89 +76,89 @@ jobs: | |
push: true | ||
context: ./auth | ||
file: ./auth/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-auth:alpha | ||
tags: wiliansilvazup/horusec-auth:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-auth:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-auth:alpha | ||
- name: Build and push analytic | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./analytic | ||
file: ./analytic/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-analytic:alpha | ||
tags: wiliansilvazup/horusec-analytic:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-analytic:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-analytic:alpha | ||
- name: Build and push core | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./core | ||
file: ./core/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-core:alpha | ||
tags: wiliansilvazup/horusec-core:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-core:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-core:alpha | ||
- name: Build and push manager | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./manager | ||
file: ./manager/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-manager:alpha | ||
tags: wiliansilvazup/horusec-manager:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-manager:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-manager:alpha | ||
- name: Build and push messages | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./messages | ||
file: ./messages/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-messages:alpha | ||
tags: wiliansilvazup/horusec-messages:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-messages:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-messages:alpha | ||
- name: Build and push migrations | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./migrations | ||
file: ./migrations/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-migrations:alpha | ||
tags: wiliansilvazup/horusec-migrations:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-migrations:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-migrations:alpha | ||
- name: Build and push vulnerability | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./vulnerability | ||
file: ./vulnerability/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-vulnerability:alpha | ||
tags: wiliansilvazup/horusec-vulnerability:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-vulnerability:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-vulnerability:alpha | ||
- name: Build and push webhook | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
context: ./webhook | ||
file: ./webhook/deployments/dockerfiles/Dockerfile | ||
tags: horuszup/horusec-webhook:alpha | ||
tags: wiliansilvazup/horusec-webhook:alpha | ||
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-webhook:alpha | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-webhook:alpha | ||
- name: Delete outdate release | ||
uses: dev-drprasad/[email protected] | ||
|
@@ -183,12 +184,12 @@ jobs: | |
## Docker images | ||
- `docker pull horuszup/horusec-analytic:alpha` | ||
- `docker pull horuszup/horusec-api:alpha` | ||
- `docker pull horuszup/horusec-auth:alpha` | ||
- `docker pull horuszup/horusec-core:alpha` | ||
- `docker pull horuszup/horusec-manager:alpha` | ||
- `docker pull horuszup/horusec-messages:alpha` | ||
- `docker pull horuszup/horusec-migrations:alpha` | ||
- `docker pull horuszup/horusec-vulnerability:alpha` | ||
- `docker pull horuszup/horusec-webhook:alpha` | ||
- `docker pull wiliansilvazup/horusec-analytic:alpha` | ||
- `docker pull wiliansilvazup/horusec-api:alpha` | ||
- `docker pull wiliansilvazup/horusec-auth:alpha` | ||
- `docker pull wiliansilvazup/horusec-core:alpha` | ||
- `docker pull wiliansilvazup/horusec-manager:alpha` | ||
- `docker pull wiliansilvazup/horusec-messages:alpha` | ||
- `docker pull wiliansilvazup/horusec-migrations:alpha` | ||
- `docker pull wiliansilvazup/horusec-vulnerability:alpha` | ||
- `docker pull wiliansilvazup/horusec-webhook:alpha` |
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 |
---|---|---|
|
@@ -23,20 +23,21 @@ on: | |
|
||
permissions: read-all | ||
jobs: | ||
beta: | ||
ReleaseBeta: | ||
permissions: | ||
contents: write | ||
packages: write | ||
issues: write | ||
env: | ||
COSIGN_KEY_LOCATION: /tmp/cosign.key | ||
COSIGN_PWD: ${{ secrets.COSIGN_PWD }} | ||
runs-on: ubuntu-latest | ||
|
||
if: contains('["wiliansilvazup","matheusalcantarazup","lucasbrunozup","nathanmartinszup","iancardosozup","oliveirafelipezup"]', github.actor) | ||
steps: | ||
- name: Set up nodejs | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
node-version: 14 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
|
@@ -69,7 +70,7 @@ jobs: | |
uses: crazy-max/ghaction-import-gpg@v4 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.PASSPHRASE }} | ||
passphrase: ${{ secrets.GPG_PASSWORD }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
|
||
|
@@ -91,9 +92,8 @@ jobs: | |
run: | | ||
./mage -v checkoutReleaseBranch ${{ steps.updated-version.outputs.nextReleaseBranchName }} | ||
- name: Create local tag | ||
run: | | ||
./mage -v createLocalTag ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
- name: Create and push tag | ||
run: ./mage -v createAndPushTag ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
|
@@ -106,8 +106,10 @@ 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 }} | ||
|
||
- name: Push go projects to dockerhub | ||
if: ${{ success() }} | ||
run: | | ||
./mage -v dockerPushPlatformGoProjects ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
|
@@ -119,19 +121,21 @@ jobs: | |
./mage -v dockerSignPlatformGoProjects ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
- name: "Docker meta" | ||
if: ${{ success() }} | ||
uses: docker/metadata-action@v3 | ||
id: meta | ||
env: | ||
RELEASE_VERSION: ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
with: | ||
images: | | ||
horuszup/horusec-manager | ||
wiliansilvazup/horusec-manager | ||
tags: | | ||
type=semver,prefix=v,pattern={{version}},value=${{ env.RELEASE_VERSION }} | ||
type=semver,prefix=v,pattern={{major}}.{{minor}},value=${{ env.RELEASE_VERSION }} | ||
type=semver,prefix=v,pattern={{major}},value=${{ env.RELEASE_VERSION }} | ||
- name: "Build and push manager" | ||
if: ${{ success() }} | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
|
@@ -142,33 +146,14 @@ jobs: | |
|
||
- name: Sign image | ||
run: | | ||
cosign sign -key $COSIGN_KEY_LOCATION horuszup/horusec-manager:${{ steps.updated-version.outputs.nextBetaVersion }} | ||
cosign sign -key $COSIGN_KEY_LOCATION wiliansilvazup/horusec-manager:${{ steps.updated-version.outputs.nextBetaVersion }} | ||
env: | ||
COSIGN_PASSWORD: ${{ secrets.COSIGN_PWD }} | ||
|
||
- name: Push updates | ||
run: | | ||
./mage -v gitPushAll | ||
if: ${{ success() }} | ||
run: ./mage -v gitPushAll | ||
|
||
- name: Update release | ||
uses: meeDamian/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
name: ${{ steps.updated-version.outputs.nextBetaVersion }} | ||
draft: true | ||
prerelease: false | ||
commitish: ${{ github.sha }} | ||
gzip: false | ||
allow_override: false | ||
body: | | ||
## Docker images | ||
- `docker pull horuszup/horusec-analytic:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-api:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-auth:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-core:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-manager:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-messages:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-migrations:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-vulnerability:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- `docker pull horuszup/horusec-webhook:${{ steps.updated-version.outputs.nextBetaVersion }}` | ||
- name: Remove updates | ||
if: ${{ !success() }} | ||
run: ./mage -v removeTag ${{ steps.updated-version.outputs.nextBetaVersion }} |
Oops, something went wrong.