Skip to content

fix: publish docker github action #110

fix: publish docker github action

fix: publish docker github action #110

name: Gradle Check and Build Workflow
on:
# FIXME: secrets not available from pull_request forks
pull_request:
branches:
- "dev"
workflow_dispatch: {}
jobs:
build-linux:
env:
# required for local testing without risking pulling the wrong image
TEST_TAG: gipo999/tomcat-webapp-boilerplate:test
permissions:
security-events: write
packages: read
issues: write
actions: read
contents: read
if: github.event.pull_request.draft == false
name: Lint and Build on Linux Job
runs-on: ubuntu-latest
steps:
- name: Checkout sources Step
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
- name: Setup CI environment
uses: ./.github/actions/ci-setup
# run the gradle check and build tasks
- name: Build with Gradle Wrapper Step
# buildWar runs check, test, war tasks
# at this point we won't know if the app will run in a container
run: ./gradlew buildWar
- name: Upload coverage to Codecov
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Setup DOCKER environment
uses: ./.github/actions/docker-setup
# test the docker image
- name: Build, run and test container
uses: ./.github/actions/build-run-testcontainer
with:
docker_tag: ${{ env.TEST_TAG }}
port_maps: "8080:8080"
load: true
push: false