Skip to content

Commit

Permalink
Merge branch 'main' into maint/115-maintenance-pin-openjdk-runtime-im…
Browse files Browse the repository at this point in the history
…ages
  • Loading branch information
devtobi authored Sep 4, 2024
2 parents 200093a + 87ae366 commit f3b97ae
Show file tree
Hide file tree
Showing 74 changed files with 2,290 additions and 260 deletions.
58 changes: 58 additions & 0 deletions .github/actions/build-image/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: build-image
description: "Builds and pushes a docker image"

inputs:
registry:
description: "Image registry to push image to"
required: true
default: ghcr.io
registry-username:
description: "Username to authenticate against image registry"
required: true
registry-password:
description: "Password to authenticate against image registry"
required: true
path:
description: "Path to the Dockerfile to build image from"
required: true
image-name:
description: "Name to give the image"
required: true
image-tags:
description: "Tags to tag image with"
required: false
default: |
type=raw,value=latest
image-labels:
description: "Labels to add to image"
required: false
default: |
org.opencontainers.image.description=See ${{ github.server_url }}/${{ github.repository }}
runs:
using: "composite"
steps:
- name: Download a single artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: target
- name: Login to Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ inputs.registry }}
username: ${{ inputs.registry-username }}
password: ${{ inputs.registry-password }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: "${{ inputs.registry }}/${{ github.repository }}/${{ inputs.image-name }}"
tags: ${{inputs.image-tags}}
labels: ${{inputs.image-labels}}
- name: Build and push image
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: ./${{ inputs.path }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
101 changes: 101 additions & 0 deletions .github/actions/build-maven/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: ""
description: ""

inputs:
module:
description: 'Module to build'
required: true
release:
description: 'Release?'
default: 'false'
release-version:
description: 'Release version'
required: false
default: "X.Y.Z"
next-version:
description: "Next version to use after release"
required: false
default: "X.Y.Z-SNAPSHOT"
java-version:
description: "Jave version used for building"
required: false
default: "21"
gpg-private-key:
description: "Gpg private key used for signing packages for maven central release"
required: false
gpg-passphrase:
description: "Gpg passphrase for private key"
required: false
sonatype-username:
description: "Sonatype username for maven central release"
required: false
sonatype-password:
description: "Sonatype password for maven central release"
required: false

runs:
using: "composite"
steps:
- name: Set up JDK
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: ${{ inputs.java-version }}
distribution: "temurin"
cache: "maven"
cache-dependency-path: "./${{ inputs.module }}/pom.xml"
server-id: "central"
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ inputs.gpg-private-key }}
gpg-passphrase: SIGN_KEY_PASS
- name: Maven build
if: ${{ inputs.release != 'true' }}
shell: bash
run: mvn -f ./${{ inputs.module }}/pom.xml --batch-mode clean install
- name: Maven release
if: ${{ inputs.release == 'true' }}
shell: bash
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
mvn release:prepare -f ./${{ inputs.module }}/pom.xml -B -DreleaseVersion=${{ inputs.release-version }} -DdevelopmentVersion=${{ inputs.next-version }} -DpushChanges=false -DremoteTagging=false
mvn release:perform -f ./${{ inputs.module }}/pom.xml -DlocalCheckout=true
env:
SIGN_KEY_PASS: ${{ inputs.gpg-passphrase }}
CENTRAL_USERNAME: ${{ inputs.sonatype-username }}
CENTRAL_PASSWORD: ${{ inputs.sonatype-password }}
- name: "Upload target artifacts"
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
with:
name: target
path: "**/target"
retention-days: 5
- name: Push changes to new branch
if: ${{ inputs.release == 'true' }}
shell: bash
run: |
git checkout -b ${{ github.ref_name }}-version-bump
git push --force origin ${{ github.ref_name }}-version-bump
- name: Create pull request
if: ${{ inputs.release == 'true' }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { repo, owner } = context.repo;
const pullResult = await github.rest.pulls.create({
title: 'chore: bump release version ${{ github.ref_name }}',
owner,
repo,
head: '${{ github.ref_name }}-version-bump',
base: '${{ github.ref_name }}',
body: [
'This PR is auto-generated'
].join('\n')
});
await github.rest.issues.addAssignees({
owner,
repo,
issue_number: pullResult.data.number,
assignees: ['${{ github.actor }}'],
});
console.log(`Pull Request created: ${pullResult.data.html_url}`);
12 changes: 6 additions & 6 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
"Type: Bug":
- head-branch: [ '^bug', 'bug' ]
"Type: Maintenance":
- head-branch: [ '^maint', 'maintenance' ]
- head-branch: [ '^maint', 'maintenance', '^refact' ]
"Type: Documentation":
- head-branch: [ '^docs', "documentation" ]
- changed-files:
- any-glob-to-any-file: ['docs/**']
- any-glob-to-any-file: [ 'docs/**' ]
"Type: Dependency":
- head-branch: [ '^dep', 'dependency' ]
"Type: Security":
- head-branch: [ '^sec', 'security' ]
"Component: API-Gateway":
- changed-files:
- any-glob-to-any-file: ['refarch-gateway/**']
"Component: Integration":
- any-glob-to-any-file: [ 'refarch-gateway/**' ]
"Component: Integrations":
- changed-files:
- any-glob-to-any-file: ['refarch-integrations/**']
- any-glob-to-any-file: [ 'refarch-integrations/**' ]
"Component: CLI":
- changed-files:
- any-glob-to-any-file: ['refarch-cli/**']
- any-glob-to-any-file: [ 'refarch-cli/**' ]
147 changes: 139 additions & 8 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,154 @@
changelog:
categories:
- title: 🎉 New Features
# refarch-gateway
- title: Gateway - 🎉 New Features
labels:
- "Type: Feature"
- title: 🐞 Bug Fixes
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"
- title: Gateway - 🐞 Bug Fixes
labels:
- "Type: Bug"
- title: 🔨 Maintenance
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"
- title: Gateway - 🔨 Maintenance
labels:
- "Type: Maintenance"
- title: 📔 Documentation
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"
- title: Gateway - 📔 Documentation
labels:
- "Type: Documentation"
- title: ⬆️ Dependency Upgrades
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"
- title: Gateway - ⬆️ Dependency Upgrades
labels:
- "Type: Dependency"
- title: 🔒️ Security
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"
- title: Gateway - 🔒️ Security
labels:
- "Type: Security"
- title: 💥 Breaking Changes
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"
- title: Gateway - 💥 Breaking Changes
labels:
- BREAKING
- BREAKING
exclude:
labels:
- "Component: Integrations"
- "Component: CLI"

# refarch-integrations
- title: Integrations - 🎉 New Features
labels:
- "Type: Feature"
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"
- title: Integrations - 🐞 Bug Fixes
labels:
- "Type: Bug"
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"
- title: Integrations - 🔨 Maintenance
labels:
- "Type: Maintenance"
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"
- title: Integrations - 📔 Documentation
labels:
- "Type: Documentation"
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"
- title: Integrations - ⬆️ Dependency Upgrades
labels:
- "Type: Dependency"
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"
- title: Integrations - 🔒️ Security
labels:
- "Type: Security"
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"
- title: Integrations - 💥 Breaking Changes
labels:
- BREAKING
exclude:
labels:
- "Component: API-Gateway"
- "Component: CLI"

# refarch-cli
- title: CLI - 🎉 New Features
labels:
- "Type: Feature"
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
- title: CLI - 🐞 Bug Fixes
labels:
- "Type: Bug"
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
- title: CLI - 🔨 Maintenance
labels:
- "Type: Maintenance"
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
- title: CLI - 📔 Documentation
labels:
- "Type: Documentation"
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
- title: CLI - ⬆️ Dependency Upgrades
labels:
- "Type: Dependency"
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
- title: CLI - 🔒️ Security
labels:
- "Type: Security"
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
- title: CLI - 💥 Breaking Changes
labels:
- BREAKING
exclude:
labels:
- "Component: API-Gateway"
- "Component: Integrations"
15 changes: 0 additions & 15 deletions .github/workflows/build.yaml

This file was deleted.

Loading

0 comments on commit f3b97ae

Please sign in to comment.