name: Build with Gradle

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11

    - uses: actions/cache@v1
      with:
        path: ~/.gradle/caches
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
        restore-keys: |
          ${{ runner.os }}-gradle-  

    - name: Build with Gradle
      run: ./gradlew build

name: Build, test, and deploy

on: [push]

jobs:
  build:
    name: Gradle
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1

    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 11

    - uses: actions/cache@v1
      with:
        path: ~/uses: actions/upload-artifact@v1
        with:
          name: homework
          path: math-homework.txt.gradle/caches
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
        restore-keys: |
          ${{ runner.os }}-gradle-  

    - name: Build with Gradle
      run: ./gradlew build
      
    - name: Upload jar-file
      uses: actions/upload-artifact@v1
      with:
        name: swoshjar
        path: build/libs/swosh.jar
  docker:
    name: Docker
    runs-on: ubuntu-latest
    needs: build
    steps:
    - name: Download jar-file
      uses: actions/download-artifact@v1
      with:
        name: swoshjar

    - name: Build Dockerfile
      env:
        REPO: edholm/swosh
      run: |
        VERSION=${git describe HEAD}
        echo $VERSION
        stat swosh.jar

Add beginnings of a docker build step
Add beginnings of a docker build step

For now it just prints the current "version"