Skip to content

Commit

Permalink
Updated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rameshmalla committed Dec 9, 2023
1 parent 4cb7eaa commit c204fbd
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 53 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Test

on:
pull_request:

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
- name: Remove default github maven configuration
run: rm ~/.m2/settings.xml
- name: Run build with Gradle Wrapper
run: ./gradlew build
53 changes: 0 additions & 53 deletions .github/workflows/gradle.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
branches: [ "main" ]
tags:
- 'v*'

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
- name: Remove default github maven configuration
run: rm ~/.m2/settings.xml
- name: Run build with Gradle Wrapper
run: ./gradlew build
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: malla/configs-operator
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit c204fbd

Please sign in to comment.