Update runner ubuntu version #1
Workflow file for this run
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
name: Documentation and NPM package | ||
env: | ||
DOCKER_PLATFORMS: "linux/amd64,linux/arm64,linux/arm/v7" | ||
ELASTICSEARCH_VERSION: "7.17.25" | ||
on: | ||
workflow_call: | ||
inputs: | ||
node_lts_maintenance_version: | ||
description: "Maintenance Node LTS Version" | ||
required: true | ||
default: "16" | ||
type: string | ||
node_lts_active_version: | ||
description: "Active Node LTS Version" | ||
required: true | ||
default: "18" | ||
type: string | ||
node_lts_current_version: | ||
description: "Current Node LTS Version" | ||
required: true | ||
default: "20" | ||
type: string | ||
workflow_dispatch: | ||
inputs: | ||
doc_deploy: | ||
description: "Deploy Documentation" | ||
required: true | ||
default: true | ||
type: boolean | ||
npm_deploy: | ||
description: "Deploy to NPM" | ||
required: true | ||
default: true | ||
type: boolean | ||
node_lts_maintenance_version: | ||
description: "Maintenance Node LTS Version" | ||
required: true | ||
default: "16" | ||
type: string | ||
node_lts_active_version: | ||
description: "Active Node LTS Version" | ||
required: true | ||
default: "18" | ||
type: string | ||
node_lts_current_version: | ||
description: "Current Node LTS Version" | ||
required: true | ||
default: "20" | ||
type: string | ||
jobs: | ||
doc-deploy: | ||
name: Documentation - Deploy | ||
if: ${{ (github.event_name != 'workflow_dispatch' || inputs.doc_deploy) && (github.ref_name == 'master' || github.ref_name == 'beta') }} | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Extract references from context | ||
shell: bash | ||
id: extract-refs | ||
run: | | ||
echo "major-version=$(jq -r .version package.json | cut -d. -f 1)" >> $GITHUB_OUTPUT | ||
echo "repo=$(echo $GITHUB_REPOSITORY | cut -d/ -f 2)" >> $GITHUB_OUTPUT | ||
- name: Trigger documentation workflow | ||
uses: convictional/[email protected] | ||
with: | ||
owner: kuzzleio | ||
repo: documentation | ||
github_token: ${{ secrets.ACCESS_TOKEN_CI }} | ||
workflow_file_name: child_repo.workflow.yml | ||
ref: ${{ github.ref_name == 'master' && 'master' || 'develop' }} | ||
client_payload: '{"repo_name":"${{ steps.extract-refs.outputs.repo }}","branch":"${{ github.head_ref }}","version":"${{ steps.extract-refs.outputs.major-version }}"}' | ||
npm-deploy: | ||
name: Build and deploy release on NPM.js | ||
if: ${{ (github.event_name != 'workflow_dispatch' || inputs.npm_deploy) && (github.ref_name == 'master' || github.ref_name == 'beta') }} | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Node version ${{ inputs.node_lts_current_version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node_lts_current_version }} | ||
registry-url: "https://registry.npmjs.org" | ||
scope: "@kuzzleio" | ||
- name: Install depedencies | ||
run: npm ci | ||
- name: Build depedencies | ||
run: npm run build | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GHP }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
SEMANTIC_RELEASE_NPM_PUBLISH: "true" | ||
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }} | ||
run: npx semantic-release | ||
publish-runner: | ||
name: Kuzzle runner Docker image | ||
needs: [npm-deploy] | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
node-version: [16, 18, 20] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./docker/images/kuzzle-runner | ||
file: ./docker/images/kuzzle-runner/Dockerfile | ||
push: true | ||
build-args: NODE_VERSION=${{ matrix.node-version }} | ||
platforms: ${{ env.DOCKER_PLATFORMS }} | ||
tags: kuzzleio/kuzzle-runner:${{ matrix.node-version }} | ||
publish-plugin-dev: | ||
name: Kuzzle plugin-dev Docker image | ||
needs: [npm-deploy] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Get current version from package.json | ||
shell: bash | ||
id: get-version | ||
run: | | ||
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
echo "major-version=$(jq -r .version package.json | cut -d. -f 1)" >> $GITHUB_OUTPUT | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./docker/images/plugin-dev/Dockerfile | ||
push: true | ||
build-args: NODE_VERSION=${{ env.NODE_VERSION }} | ||
platforms: ${{ env.DOCKER_PLATFORMS }} | ||
tags: kuzzleio/plugin-dev:${{ steps.get-version.outputs.major-version }},kuzzleio/plugin-dev:latest,kuzzleio/plugin-dev:${{ steps.get-version.outputs.version }} | ||
publish-kuzzle-core: | ||
name: Kuzzle core Docker image | ||
needs: [npm-deploy] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Get current version from package.json | ||
shell: bash | ||
id: get-version | ||
run: | | ||
echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT | ||
echo "major-version=$(jq -r .version package.json | cut -d. -f 1)" >> $GITHUB_OUTPUT | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./docker/images/kuzzle/Dockerfile | ||
push: true | ||
build-args: NODE_VERSION=${{ env.NODE_VERSION }} | ||
platforms: ${{ env.DOCKER_PLATFORMS }} | ||
tags: kuzzleio/kuzzle:${{ steps.get-version.outputs.major-version }},kuzzleio/kuzzle:latest,kuzzleio/kuzzle:${{ steps.get-version.outputs.version }} | ||
publish-core-dev: | ||
name: Kuzzle core-dev Docker image | ||
needs: [npm-deploy] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./docker/images/core-dev | ||
file: ./docker/images/core-dev/Dockerfile | ||
push: true | ||
build-args: NODE_VERSION=${{ env.NODE_VERSION }} | ||
platforms: ${{ env.DOCKER_PLATFORMS }} | ||
tags: kuzzleio/core-dev:2,kuzzleio/core-dev:latest | ||
publish-elasticsearch: | ||
name: Elasticsearch Docker image | ||
needs: [npm-deploy] | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install additional libraries | ||
uses: ./.github/actions/install-packages | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: ./docker/images/elasticsearch | ||
file: ./docker/images/elasticsearch/Dockerfile | ||
push: true | ||
build-args: ELASTICSEARCH_VERSION=${{ env.ELASTICSEARCH_VERSION }} | ||
platforms: ${{ env.DOCKER_PLATFORMS }} | ||
tags: kuzzleio/elasticsearch:${{ env.ELASTICSEARCH_VERSION }},kuzzleio/elasticsearch:7, kuzzleio/elasticsearch:latest |