Skip to content

docker test on CONTAINER #2

docker test on CONTAINER

docker test on CONTAINER #2

name: docker test on CONTAINER
on: workflow_dispatch
jobs:
dockertest:
runs-on: [self-hosted, linux, x64, CONTAINER]
steps:
- uses: actions/checkout@v4
- name: login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-buildx-action
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
# https://github.com/actions/setup-java
- uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: '11'
cache: 'gradle'
architecture: x64
- name: build java
run: ./gradlew build --no-daemon --stacktrace
- name: build image
run: >-
docker buildx build
--build-arg JAR_FILE=build/libs/\*.jar
--file ./Dockerfile
--platform linux/amd64,linux/arm64
--tag ghcr.io/${GITHUB_REPOSITORY}:test
--push .