Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

versioning:release - [skip ci] automatic pull request updating versioning files #1

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
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

4 changes: 2 additions & 2 deletions .github/workflows/e2e-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up nodejs
uses: actions/setup-node@v2
with:
node-version: "12"
node-version: "14"
id: node
- uses: actions/checkout@v2
# - name: Run e2e tests
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Set up nodejs
uses: actions/setup-node@v2
with:
node-version: "12"
node-version: "14"
id: node
- uses: actions/checkout@v2
# - name: Run e2e tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manager-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up nodejs
uses: actions/setup-node@v2
with:
node-version: "12"
node-version: "14"
id: node
- uses: actions/checkout@v2
- name: Install dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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/delete-tag-and-release@v0.2.0
Expand All @@ -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`
51 changes: 18 additions & 33 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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 }}

Expand All @@ -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
Expand All @@ -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/github-release@2.0
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 }}
Loading