Skip to content

feat(setting): add EventProxyConfigProvider for event publishing. #2

feat(setting): add EventProxyConfigProvider for event publishing.

feat(setting): add EventProxyConfigProvider for event publishing. #2

Workflow file for this run

name: Build Image CI
on:
push:
branches: [ "master", "main" ]
tags-ignore:
- "*"
paths-ignore:
- docs/**
- .github/**
- .gitignore
- .gitattributes
- .editorconfig
- .gitmodules
- .idea/**
- .vscode/**
- distribution/**
pull_request:
branches: [ "master", "main" ]
paths-ignore:
- docs/**
- .github/**
- .gitignore
- .gitattributes
- .editorconfig
- .gitmodules
- .idea/**
- .vscode/**
- distribution/**
env:
namespace: ${{ github.repository_owner }}
permissions: write-all
jobs:
build:
runs-on:
ubuntu-latest
timeout-minutes: 360 # 6 hours
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
with:
build-scan-publish: false
- name: Generate CI Version
# TODO: add an gradle compile option to set version from the CI
run: |
chmod +x gradlew
version=$(./gradlew -q :version)
commit=$(git rev-parse --short HEAD)
echo "raw_version_name=${version}" >> $GITHUB_ENV
echo "version_name=${version}-${commit}" >> $GITHUB_ENV
echo "remote_tag=${version}-${commit}" >> $GITHUB_ENV
id: project_version
- name: Install Dependencies
run: |
git clone https://github.com/roll-w/web-common-starter
cd web-common-starter
git checkout v0.2.1
mvn -f web-common-parent/ clean install
cd ..
- name: Build
run: |
chmod +x gradlew
./gradlew buildImage
mv build/dist/lampray-${{ env.raw_version_name }}-dist.tar.gz build/dist/lampray-${{ env.version_name }}-dist.tar.gz
- name: Upload Dist
uses: actions/upload-artifact@v4
with:
name: lampray-${{ env.version_name }}-dist.tar.gz
path: build/dist/lampray-${{ env.version_name }}-dist.tar.gz
- name: Push Image
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker tag lampray:${{ env.raw_version_name }} ghcr.io/${{ env.namespace }}/lampray:${{ env.remote_tag }}
docker push ghcr.io/${{ env.namespace }}/lampray:${{ env.remote_tag }}
sha=$(docker inspect ghcr.io/${{ env.namespace }}/lampray:${{ env.remote_tag }} --format='{{index .RepoDigests 0}}')
echo "digest=$sha" >> $GITHUB_ENV
fi