Skip to content

Commit

Permalink
Fix Actions definition
Browse files Browse the repository at this point in the history
  • Loading branch information
evgri243 committed Nov 3, 2023
1 parent 50e1dce commit f1fdb52
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
34 changes: 21 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
name: Gradle Build
name: Build & Push

on:
push:
branches:
- main
pull_request:
branches:
- main

# cancel workflow if there is already one running
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: [push, pull_request]
branches:
only:
- master

jobs:
build:
Expand All @@ -16,13 +25,11 @@ jobs:
with:
java-version: 17
distribution: liberica
- name: Gradle Wrapper Validation
uses: gradle/[email protected]
- uses: gradle/[email protected]
with:
arguments: build --stacktrace
- name: Build plugin
run: ./gradlew buildPlugin
working-directory: ide-former-plugin

# build docker container
# build docker container
docker:
runs-on: ubuntu-latest

Expand All @@ -43,9 +50,10 @@ jobs:
with:
context: .
file: ./Dockerfile
push: ${{ github.ref == 'refs/heads/master' }}
platforms: linux/amd64,linux/arm64
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
platforms: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && 'linux/amd64,linux/arm64' || 'linux/amd64' }}
tags: ghcr.io/${{ github.repository }}/runner:latest,ghcr.io/${{ github.repository }}/runner:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}/runner:latest



Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:20.04

# Install Java
RUN apt-get update && apt-get install -y \
openjdk-11-jdk \
openjdk-17-jdk \
&& java -version

# Install Git
Expand Down

0 comments on commit f1fdb52

Please sign in to comment.