mirror of https://github.com/hyperledger/besu
An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
4.7 KiB
125 lines
4.7 KiB
name: nightly
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# * is a special character in YAML so you have to quote this string
|
|
# expression evaluates to midnight every night
|
|
- cron: '0 0 * * *'
|
|
|
|
env:
|
|
nightly-tag: develop
|
|
registry: ghcr.io
|
|
|
|
jobs:
|
|
hadolint:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
|
- name: Set up Java
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
- name: setup gradle
|
|
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
|
|
- name: hadoLint_openj9-jdk_17
|
|
run: docker run --rm -i hadolint/hadolint < docker/openj9-jdk-17/Dockerfile
|
|
- name: hadoLint_openjdk_17
|
|
run: docker run --rm -i hadolint/hadolint < docker/openjdk-17/Dockerfile
|
|
- name: hadoLint_openjdk_17_debug
|
|
run: docker run --rm -i hadolint/hadolint < docker/openjdk-17-debug/Dockerfile
|
|
- name: hadoLint_openjdk_latest
|
|
run: docker run --rm -i hadolint/hadolint < docker/openjdk-latest/Dockerfile
|
|
- name: hadoLint_graalvm
|
|
run: docker run --rm -i hadolint/hadolint < docker/graalvm/Dockerfile
|
|
buildDocker:
|
|
needs: hadolint
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- ubuntu-22.04
|
|
- [self-hosted, ARM64]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Prepare
|
|
id: prep
|
|
run: |
|
|
platform=${{ matrix.platform }}
|
|
if [ "$platform" = 'ubuntu-22.04' ]; then
|
|
echo "PLATFORM_PAIR=linux-amd64" >> $GITHUB_OUTPUT
|
|
echo "ARCH=amd64" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "PLATFORM_PAIR=linux-arm64" >> $GITHUB_OUTPUT
|
|
echo "ARCH=arm64" >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
|
- name: short sha
|
|
id: shortSha
|
|
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
- name: Set up Java
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
- name: login to ghcr
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
|
|
with:
|
|
registry: ${{ env.registry }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: build image
|
|
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
|
|
with:
|
|
arguments: distDocker -PdockerOrgName=${{ env.registry }}/${{ github.repository_owner }} -Pbranch=main
|
|
- name: install goss
|
|
run: |
|
|
mkdir -p docker/reports
|
|
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.4.4/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} -o ./docker/tests/goss-${{ steps.prep.outputs.PLATFORM_PAIR }}
|
|
- name: test docker
|
|
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
|
|
env:
|
|
architecture: ${{ steps.prep.outputs.ARCH }}
|
|
with:
|
|
arguments: testDocker -PdockerOrgName=${{ env.registry }}/${{ github.repository_owner }} -Pbranch=main
|
|
- name: login to ghcr
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
|
|
with:
|
|
registry: ${{ env.registry }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: publish
|
|
env:
|
|
architecture: ${{ steps.prep.outputs.ARCH }}
|
|
run: ./gradlew --no-daemon dockerUpload -PdockerOrgName=${{ env.registry }}/${{ github.repository_owner }} -Pbranch=main
|
|
multiArch:
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
needs: buildDocker
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
|
|
- name: Set up Java
|
|
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
- name: setup gradle
|
|
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
|
|
with:
|
|
registry: ${{ env.registry }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: multi-arch docker
|
|
run: ./gradlew manifestDocker -PdockerOrgName=${{ env.registry }}/${{ github.repository_owner }} -Pbranch=main
|
|
|
|
|