Skip to content

Add dockerPush to CI #15

Add dockerPush to CI

Add dockerPush to CI #15

Workflow file for this run

name: Java CI with Gradle
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
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: Set up Node
uses: actions/setup-node@v4.0.0
with:
node-version: '16.x'
- name: Install Node dependencies
run: npm ci
working-directory: ./http-server
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
- name: Push Docker image
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: dockerPush
if: github.ref == 'refs/heads/main'