Skip to content
Merged
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
16 changes: 16 additions & 0 deletions .github/workflows/conventional-commits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Conventional Commit as PR title

on:
pull_request_target:
types:
- opened
- edited
- reopened

jobs:
lint-pr-title:
# Prevent execution on forks
if: github.repository_owner == 'iExecBlockchainComputing'
permissions:
pull-requests: read
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/conventional-commits.yml@conventional-commits-v1.1.0
78 changes: 78 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Build and Push OCI Image

on:
pull_request:
push:
branches: [main]
tags:
- 'v*.*.*'
# can only be executed by people with write access on repository
workflow_dispatch:

jobs:
prepare:
name: Determine image tag
runs-on: ubuntu-latest
# Prevent execution on forks
if: github.repository_owner == 'iExecBlockchainComputing'
outputs:
image_tag: ${{ steps.determine-tag.outputs.image_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Determine Docker tag based on Git ref
id: determine-tag
run: |
if [ "${{ github.ref_type }}" = "tag" ] ; then
# Since this workflow only triggers on tags matching 'v*.*.*' we know we're always dealing with a version tag
TAG_ON_MAIN=$(git branch -r --contains ${{ github.sha }} 'origin/main')

if [ -z "$TAG_ON_MAIN" ] ; then
echo "Error: Tag ${{ github.ref_name }} is not on main branch"
echo "Tags must be created on main branch to generate X.Y.Z image tags"
exit 1
fi

GITHUB_REF_NAME="${{ github.ref_name }}"
echo "Processing tag on main branch: ${{ github.ref_name }}"
echo "image_tag=${GITHUB_REF_NAME#v}" | tee -a $GITHUB_OUTPUT
else
if [ "${{ github.event_name }}" = "pull_request" ] ; then
SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-8)
else
SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-8)
fi

if [ "${{ github.ref_name }}" = "main" ] ; then
echo "Processing main branch"
echo "image_tag=dev-${SHORT_SHA}" | tee -a $GITHUB_OUTPUT
else
# This covers other branches
echo "Processing feat/fix branch ${{ github.head_ref }}"
echo "image_tag=feature-${SHORT_SHA}" | tee -a $GITHUB_OUTPUT
fi
fi

build-oci-image:
name: Build OCI image
needs: prepare
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@docker-build-v3.3.0
with:
image-name: docker-regis.iex.ec/nodesj-hello-world
image-tag: ${{ needs.prepare.outputs.image_tag }}
dockerfile: cloud-computing/Dockerfile
context: cloud-computing
registry: docker-regis.iex.ec
push: true
security-scan: false
security-report: "comment"
hadolint: true
platform: linux/amd64
secrets:
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN_PULL_ONLY }}
username: ${{ secrets.NEXUS_USERNAME }}
password: ${{ secrets.NEXUS_PASSWORD }}
18 changes: 18 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Please

on:
push:
branches:
- main

permissions:
contents: write
issues: write
pull-requests: write

jobs:
release-please:
# Prevent execution on forks
if: github.repository_owner == 'iExecBlockchainComputing'
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/release-please.yml@release-please-v2.0.0
secrets: inherit
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".":"8.0.4"}
13 changes: 0 additions & 13 deletions Jenkinsfile

This file was deleted.

9 changes: 5 additions & 4 deletions cloud-computing/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM node:14-alpine3.10
FROM node:24-alpine3.23

### install your dependencies
RUN mkdir /app && cd /app && npm install figlet@1.x
WORKDIR /app

COPY ./src /app
RUN npm install figlet@1.x

COPY ./src .

ENTRYPOINT [ "node", "/app/app.js"]
10 changes: 10 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"draft-pull-request": true,
"include-component-in-tag": false,
"include-v-in-tag": true,
"release-type": "simple",
"packages": {
".": {}
}
}