Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Merge pull request #61 from atlanhq/DX-266 #68

Merge pull request #61 from atlanhq/DX-266

Merge pull request #61 from atlanhq/DX-266 #68

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 Atlan Pte. Ltd.
name: "Merge"
on:
push:
branches: [main]
jobs:
merge-build:
runs-on: ubuntu-latest
name: "Merge"
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Set version
id: get_version
run: |
echo "version=$(./gradlew properties --no-daemon --console=plain -q | grep '^version:' | awk '{printf $2}')" >> $GITHUB_OUTPUT
- name: Build artifacts
run: ./gradlew assemble
env:
GH_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: jars
path: jars/*.jar
publish-images:
needs: merge-build
runs-on: ubuntu-latest
name: "Containers"
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create assembly area
run: |
mkdir -p ./containers/assembly
- uses: actions/download-artifact@v3
with:
name: jars
path: ./containers/assembly
- name: Build and publish container image
if: ${{ github.ref == 'refs/heads/main'}}
uses: docker/build-push-action@v5
with:
push: true
tags: ghcr.io/atlanhq/atlan-kotlin-samples:${{ needs.merge-build.outputs.version }},ghcr.io/atlanhq/atlan-kotlin-samples:latest
context: ./containers
platforms: linux/amd64