-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81d6985
commit 1d35792
Showing
1 changed file
with
77 additions
and
77 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -2,59 +2,59 @@ name: publish | |
run-name: Publish | ||
on: | ||
push: | ||
branches: | ||
- "enhancement/publish-docker-image-arm64" | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+*" # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
jobs: | ||
# publish-sdk-java: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# - name: Setup Java | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# distribution: "corretto" | ||
# java-version: "11" | ||
# - name: Tests | ||
# run: ./gradlew sdk-java:test | ||
# - name: Import GPG key | ||
# uses: crazy-max/ghaction-import-gpg@v5 | ||
# with: | ||
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
# passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
# - name: Generate KeyRing | ||
# run: | | ||
# gpg --keyring secring.gpg --export-secret-keys --passphrase ${{ secrets.GPG_PASSPHRASE }} --batch --yes --pinentry-mode=loopback > ~/.gnupg/secring.gpg | ||
# ls ~/.gnupg/ | ||
# - name: Publish | ||
# run: | | ||
# ./gradlew sdk-java:publish -Psigning.secretKeyRingFile=/home/runner/.gnupg/secring.gpg -Psigning.password=${{ secrets.GPG_PASSPHRASE }} -Psigning.keyId=${{ vars.GPG_KEY_ID }} -PossrhUsername=${{ secrets.OSSRH_USERNAME }} -PossrhPassword=${{ secrets.OSSRH_PASSWORD }} | ||
# echo Login at https://s01.oss.sonatype.org/ | ||
# publish-sdk-python: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.9" | ||
# - name: Install Dependencies | ||
# run: | | ||
# python -m pip install --upgrade pip setuptools wheel | ||
# pip install poetry | ||
# - name: Tests | ||
# working-directory: ./sdk-python | ||
# run: | | ||
# poetry install | ||
# poetry run python -m unittest -v | ||
# poetry build | ||
# - name: Publish Package | ||
# uses: pypa/[email protected] | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN }} | ||
# packages-dir: ./sdk-python/dist/ | ||
publish-sdk-java: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "corretto" | ||
java-version: "11" | ||
- name: Tests | ||
run: ./gradlew sdk-java:test | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
- name: Generate KeyRing | ||
run: | | ||
gpg --keyring secring.gpg --export-secret-keys --passphrase ${{ secrets.GPG_PASSPHRASE }} --batch --yes --pinentry-mode=loopback > ~/.gnupg/secring.gpg | ||
ls ~/.gnupg/ | ||
- name: Publish | ||
run: | | ||
./gradlew sdk-java:publish -Psigning.secretKeyRingFile=/home/runner/.gnupg/secring.gpg -Psigning.password=${{ secrets.GPG_PASSPHRASE }} -Psigning.keyId=${{ vars.GPG_KEY_ID }} -PossrhUsername=${{ secrets.OSSRH_USERNAME }} -PossrhPassword=${{ secrets.OSSRH_PASSWORD }} | ||
echo Login at https://s01.oss.sonatype.org/ | ||
publish-sdk-python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.9" | ||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install poetry | ||
- name: Tests | ||
working-directory: ./sdk-python | ||
run: | | ||
poetry install | ||
poetry run python -m unittest -v | ||
poetry build | ||
- name: Publish Package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
packages-dir: ./sdk-python/dist/ | ||
publish-docker-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -100,37 +100,37 @@ jobs: | |
run: | | ||
docker build -f docker/server/Dockerfile -t $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG . | ||
docker tag $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
# docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG | ||
# docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
- name: Push Standalone Image to Amazon ECR | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: false | ||
push: true | ||
tags: "${{ steps.login-ecr-public.outputs.registry }}/littlehorse/lh-standalone:latest,${{ steps.login-ecr-public.outputs.registry }}/littlehorse/lh-standalone:${{ github.ref_name }}" | ||
platforms: "linux/amd64,linux/arm64" | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
file: ./docker/standalone/Dockerfile | ||
context: ./ | ||
# - name: Push lhctl CLI Image to Amazon ECR | ||
# env: | ||
# ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | ||
# ECR_REGISTRY_ALIAS: littlehorse | ||
# ECR_REPOSITORY: lhctl | ||
# IMAGE_TAG: ${{ github.ref_name }} | ||
# run: | | ||
# docker build -f docker/lhctl/Dockerfile -t $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG . | ||
# docker tag $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
# docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG | ||
# docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
# - name: Push Dashboard Image to Amazon ECR | ||
# env: | ||
# ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | ||
# ECR_REGISTRY_ALIAS: littlehorse | ||
# ECR_REPOSITORY: lh-dashboard | ||
# IMAGE_TAG: ${{ github.ref_name }} | ||
# run: | | ||
# docker build -f docker/dashboard/Dockerfile -t $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG . | ||
# docker tag $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
# docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG | ||
# docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
- name: Push lhctl CLI Image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | ||
ECR_REGISTRY_ALIAS: littlehorse | ||
ECR_REPOSITORY: lhctl | ||
IMAGE_TAG: ${{ github.ref_name }} | ||
run: | | ||
docker build -f docker/lhctl/Dockerfile -t $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG . | ||
docker tag $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
- name: Push Dashboard Image to Amazon ECR | ||
env: | ||
ECR_REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | ||
ECR_REGISTRY_ALIAS: littlehorse | ||
ECR_REPOSITORY: lh-dashboard | ||
IMAGE_TAG: ${{ github.ref_name }} | ||
run: | | ||
docker build -f docker/dashboard/Dockerfile -t $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG . | ||
docker tag $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest | ||
docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:$IMAGE_TAG | ||
docker push $ECR_REGISTRY/$ECR_REGISTRY_ALIAS/$ECR_REPOSITORY:latest |