Merge pull request #18 from leanix/feature/CID-2874/support-yaml-and-… #11
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: Release Dev Docker Image | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@v2 | |
continue-on-error: false | |
with: | |
arguments: build | |
- name: Login to Azure registry | |
uses: azure/docker-login@v1 | |
with: | |
login-server: ${{ secrets.ACR_PUBLIC_LOGIN }} | |
username: ${{ secrets.ACR_PUBLIC_USERNAME }} | |
password: ${{ secrets.ACR_PUBLIC_PASSWORD }} | |
- name: Setup ssh | |
uses: webfactory/ssh-agent@v0.4.1 | |
with: | |
ssh-private-key: ${{ secrets.CI_GITHUB_SSH_PRIVATE_KEY }} | |
ssh-auth-sock: ${{ env.SSH_AUTH_SOCK }} | |
- name: Build and push image to Azure public registry | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: Dockerfile | |
tags: ${{ secrets.ACR_PUBLIC_LOGIN }}/leanix-github-agent:dev | |
push: true | |
ssh: default=${{ env.SSH_AUTH_SOCK }} |