-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(): first iteration of new main workflow
- Loading branch information
Showing
12 changed files
with
393 additions
and
26 deletions.
There are no files selected for viewing
File renamed without changes.
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
File renamed without changes.
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: Github Release | ||
description: Create a Github Release | ||
inputs: | ||
github-token: | ||
description: 'Github Token' | ||
required: true | ||
gh-personal: | ||
description: 'Github Personal Token' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
name: Github Release | ||
steps: | ||
# Download Exec | ||
- name: Artifacts - Download executable | ||
uses: actions/download-artifact@v4 | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
with: | ||
name: exe | ||
path: build/executable | ||
|
||
# GitHub Release | ||
- name: GitHub - Create release | ||
id: create_github_release | ||
uses: "marvinpinto/action-automatic-releases@latest" | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
continue-on-error: true | ||
with: | ||
repo_token: "${{ inputs.github-token }}" | ||
prerelease: false | ||
files: | | ||
build/executable/* | ||
# Trigger gha workflow to bump helm chart version | ||
- name: GitHub - Trigger the Helm chart version bump | ||
uses: peter-evans/repository-dispatch@v3 | ||
if: steps.create_github_release.conclusion == 'success' | ||
with: | ||
token: ${{ inputs.gh-personal }} | ||
repository: kestra-io/helm-charts | ||
event-type: update-helm-chart-version | ||
client-payload: |- | ||
{ | ||
"new_version": "${{ github.ref_name }}", | ||
"github_repository": "${{ github.repository }}", | ||
"github_actor": "${{ github.actor }}" | ||
} |
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,81 @@ | ||
name: Publish Docker | ||
|
||
inputs: | ||
dockerhub-username: | ||
description: 'DockerHub Username' | ||
required: true | ||
dockerhub-password: | ||
description: 'DockerHub Password' | ||
required: true | ||
tag: | ||
description: 'The Docker image Tag for Kestra' | ||
required: true | ||
plugins: | ||
description: 'The Kestra plugins to be used for the build.' | ||
required: false | ||
packages: | ||
description: 'The packages to be installed in the docker image.' | ||
required: false | ||
default: "" | ||
python-libraries: | ||
description: 'The python libraries to be installed in the docker image.' | ||
required: false | ||
default: "" | ||
|
||
runs: | ||
using: composite | ||
name: Publish Docker | ||
steps: | ||
- name: Checkout - Current ref | ||
uses: actions/checkout@v4 | ||
|
||
# Docker setup | ||
- name: Docker - Setup QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Docker - Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
# Docker Login | ||
- name: Docker - Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ inputs.dockerhub-username }} | ||
password: ${{ inputs.dockerhub-password }} | ||
|
||
# Vars | ||
- name: Docker - Set image name | ||
shell: bash | ||
id: vars | ||
run: | | ||
TAG=${GITHUB_REF#refs/*/} | ||
if [[ $TAG = "master" || $TAG == v* ]]; then | ||
echo "plugins=${{ inputs.plugins }}" >> $GITHUB_OUTPUT | ||
else | ||
echo "plugins=--repositories=https://s01.oss.sonatype.org/content/repositories/snapshots ${{ inputs.plugins }}" >> $GITHUB_OUTPUT | ||
fi | ||
# Build Docker Image | ||
- name: Artifacts - Download executable | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: exe | ||
path: build/executable | ||
|
||
- name: Docker - Copy exe to image | ||
shell: bash | ||
run: | | ||
cp build/executable/* docker/app/kestra && chmod +x docker/app/kestra | ||
# Docker Build and push | ||
- name: Docker - Build image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
push: true | ||
tags: kestra/kestra:${{ inputs.tag }} | ||
platforms: linux/amd64,linux/arm64 | ||
build-args: | | ||
KESTRA_PLUGINS=${{ steps.vars.outputs.plugins }} | ||
APT_PACKAGES=${{inputs.packages}} | ||
PYTHON_LIBRARIES=${{inputs.python-libraries}} |
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,55 @@ | ||
name: Publish Maven | ||
description: Publish Maven artifacts to Maven Central | ||
|
||
inputs: | ||
sonatype-username: | ||
description: 'Sonatype Username' | ||
required: true | ||
sonatype-password: | ||
description: 'Sonatype Password' | ||
required: true | ||
sonatype-gpg-keyid: | ||
description: 'GPG Key ID' | ||
required: true | ||
sonatype-gpg-password: | ||
description: 'GPG Password' | ||
required: true | ||
sonatype-gpg-file: | ||
description: 'GPG File' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
name: Publish Maven | ||
steps: | ||
- name: Checkout - Current ref | ||
uses: actions/checkout@v4 | ||
|
||
# Setup build | ||
- name: Setup - Build | ||
uses: kestra-io/actions/.github/actions/setup-build@main | ||
id: build | ||
with: | ||
java-enabled: true | ||
node-enabled: true | ||
|
||
# Publish | ||
- name: Publish - Release package to Maven Central | ||
shell: bash | ||
env: | ||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ inputs.sonatype-username }} | ||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ inputs.sonatype-password }} | ||
SONATYPE_GPG_KEYID: ${{ inputs.sonatype-gpg-keyid }} | ||
SONATYPE_GPG_PASSWORD: ${{ inputs.sonatype-gpg-password }} | ||
SONATYPE_GPG_FILE: ${{ inputs.sonatype-gpg-file }} | ||
run: | | ||
mkdir -p ~/.gradle/ | ||
echo "signing.keyId=${SONATYPE_GPG_KEYID}" > ~/.gradle/gradle.properties | ||
echo "signing.password=${SONATYPE_GPG_PASSWORD}" >> ~/.gradle/gradle.properties | ||
echo "signing.secretKeyRingFile=${HOME}/.gradle/secring.gpg" >> ~/.gradle/gradle.properties | ||
echo ${SONATYPE_GPG_FILE} | base64 -d > ~/.gradle/secring.gpg | ||
./gradlew publishToSonatype ${{ startsWith(github.ref, 'refs/tags/v') && 'closeAndReleaseSonatypeStagingRepository' || '' }} | ||
# Gradle dependency | ||
- name: Java - Gradle dependency graph | ||
uses: gradle/actions/dependency-submission@v4 |
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,9 +1,9 @@ | ||
name: Main | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - develop | ||
push: | ||
branches: | ||
- develop | ||
# tags: | ||
# - v* | ||
# pull_request: | ||
|
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,2 +1,47 @@ | ||
name: Main Workflow | ||
|
||
on: | ||
jobs: | ||
push: | ||
branches: | ||
- develop | ||
jobs: | ||
tests: | ||
name: Execute tests | ||
uses: ./.github/workflows/workflow-test.yml | ||
|
||
release: | ||
name: Release | ||
needs: [tests] | ||
uses: ./.github/workflows/workflow-release.yml | ||
with: | ||
docker-tag: ${{ needs.tests.outputs.docker-tag }} | ||
plugins: ${{ needs.tests.outputs.plugins }} | ||
|
||
end: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- release | ||
if: always() | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
steps: | ||
# Update | ||
- name: Github - Update internal | ||
uses: benc-uk/workflow-dispatch@v1 | ||
if: github.ref == 'refs/heads/develop' && needs.docker.result == 'success' | ||
with: | ||
workflow: oss-build.yml | ||
repo: kestra-io/infra | ||
ref: master | ||
token: ${{ secrets.GH_PERSONAL_TOKEN }} | ||
|
||
# Slack | ||
- name: Slack - Notification | ||
uses: Gamesight/slack-workflow-status@master | ||
if: ${{ always() && env.SLACK_WEBHOOK_URL != 0 }} | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
name: GitHub Actions | ||
icon_emoji: ":github-actions:" | ||
channel: "C02DQ1A7JLR" # _int_git channel |
Oops, something went wrong.