From debde2e9660e9ebd7944c5754a9c4efe020f176b Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Thu, 24 Oct 2024 10:39:36 +0300 Subject: [PATCH] wip --- .github/workflows/check-pr.yaml | 3 +- .github/workflows/publish-docker-image.yml | 6 ++- .github/workflows/publish-release.yml | 55 +++++++++------------- .github/workflows/push-default-branch.yml | 5 +- 4 files changed, 31 insertions(+), 38 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 1c26684e1e..606b91673a 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -5,7 +5,7 @@ on: jobs: check-pr: name: Check PR - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -15,6 +15,7 @@ jobs: cache: 'sbt' gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} + - uses: sbt/setup-sbt@v1 - name: Check PR run: sbt -J-Xlog:gc*=debug:file=./gc.log --mem 8096 --batch ";checkPR;completeQaseRun" env: diff --git a/.github/workflows/publish-docker-image.yml b/.github/workflows/publish-docker-image.yml index ecf996bc27..077ffbe1d6 100644 --- a/.github/workflows/publish-docker-image.yml +++ b/.github/workflows/publish-docker-image.yml @@ -18,7 +18,7 @@ env: jobs: build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest permissions: contents: read packages: write @@ -26,11 +26,15 @@ jobs: id-token: write steps: - uses: actions/checkout@v4 + with: + fetch-depth: 20 + fetch-tags: true - uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: '11' cache: 'sbt' + - uses: sbt/setup-sbt@v1 - run: sbt --mem 4096 --batch buildTarballsForDocker - uses: docker/login-action@v3 with: diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 4db33b70be..4f46ea2b38 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -7,7 +7,7 @@ on: jobs: publish-node-image: name: Publish node image - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -15,65 +15,52 @@ jobs: distribution: 'temurin' java-version: '11' cache: 'sbt' - - - name: Build tarballs for Docker - run: sbt --mem 4096 --batch ';buildTarballsForDocker;buildRIDERunnerForDocker' - - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v3 - - - name: Log into Docker Hub registry - uses: docker/login-action@v3 + - uses: sbt/setup-sbt@v1 + - run: sbt --mem 4096 --batch ';buildTarballsForDocker;buildRIDERunnerForDocker' + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USER }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - - name: Extract Docker public node metadata - id: meta-public + - id: meta-public uses: docker/metadata-action@v5 with: images: wavesplatform/wavesnode - flavor: | - latest=false + flavor: latest=false tags: | type=match,pattern=v(.*),group=1 type=raw,value=latest,enable=${{ github.event.release.prerelease == false }} - - name: Extract Docker private node metadata - id: meta-private + - id: meta-private uses: docker/metadata-action@v5 with: images: wavesplatform/waves-private-node - flavor: | - latest=false + flavor: latest=false tags: | type=ref,event=tag type=raw,value=latest,enable=${{ github.event.release.prerelease == false }} - - name: Extract Docker RIDE runner metadata - id: meta-ride-runner + - id: meta-ride-runner uses: docker/metadata-action@v5 with: images: wavesplatform/ride-runner - flavor: | - latest=false + flavor: latest=false tags: | type=match,pattern=v(.*),group=1 type=raw,value=latest,enable=${{ github.event.release.prerelease == false }} - - name: Build and push Docker public image - id: build-and-push-public - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@v5 with: + platforms: linux/amd64,linux/arm64 context: ./docker push: true pull: true tags: ${{ steps.meta-public.outputs.tags }} - - name: Build and push Docker private image - id: build-and-push-private - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@v5 with: + platforms: linux/amd64,linux/arm64 context: ./docker/private push: true pull: true @@ -81,9 +68,7 @@ jobs: build-args: | NODE_TAG=${{ steps.meta-public.outputs.version }} - - name: Build and push Docker RIDE runner image - id: build-and-push-ride-runner - uses: docker/build-push-action@v5 + - uses: docker/build-push-action@v5 with: context: ./ride-runner/docker push: true @@ -92,9 +77,9 @@ jobs: publish-node-sbt-builder-image: name: Publish node SBT builder image - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - id: extract-versions run: | echo "waves-version=$(cut -d\" -f2 version.sbt)" >> $GITHUB_OUTPUT @@ -106,6 +91,7 @@ jobs: password: ${{ secrets.DOCKERHUB_PASSWORD }} - uses: docker/build-push-action@v5 with: + platforms: linux/amd64,linux/arm64 context: ./docker file: ./docker/node-sbt-builder.Dockerfile push: true @@ -117,7 +103,7 @@ jobs: publish-release-jars: name: Publish jars to Sonatype - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - id: sbt-version @@ -138,6 +124,7 @@ jobs: cache: 'sbt' gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} + - uses: sbt/setup-sbt@v1 - name: Publish release jars env: SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} diff --git a/.github/workflows/push-default-branch.yml b/.github/workflows/push-default-branch.yml index e8b7a810ff..b66983c2cc 100644 --- a/.github/workflows/push-default-branch.yml +++ b/.github/workflows/push-default-branch.yml @@ -8,7 +8,7 @@ on: jobs: update-graph: name: Update Dependency Graph - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: scalacenter/sbt-dependency-submission@v3 @@ -16,7 +16,7 @@ jobs: configs-ignore: test compile-internal provided publish-snapshot: name: Publish Snapshots to Sonatype - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 @@ -26,6 +26,7 @@ jobs: cache: 'sbt' gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }} gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }} + - uses: sbt/setup-sbt@v1 - name: Publish snapshots env: SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}