chore: update adventure monorepo to v4.26.1 (#1825) #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Publish Docker Image" | |
| on: | |
| push: | |
| branches: | |
| - release | |
| - beta | |
| - nightly | |
| concurrency: | |
| cancel-in-progress: true | |
| group: publish-docker-image-${{ github.ref }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build_push: | |
| name: Build and Push Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Resolve Variables | |
| id: resolve_variables | |
| run: | | |
| echo "build_time=$(date --utc +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_OUTPUT | |
| echo "short_commit_sha=$(cut -c1-8 <<< "${{ github.sha }}")" >> $GITHUB_OUTPUT | |
| echo "version=$(grep -oP '(?<=const val CLOUDNET = ")[^"]+' build-extensions/src/main/kotlin/eu/cloudnetservice/cloudnet/gradle/util/Versions.kt)" >> $GITHUB_OUTPUT | |
| - name: Resolve Tags | |
| id: resolve_tags | |
| env: | |
| IMAGE: "docker.io/cloudnetservice/cloudnet" | |
| VERSION: ${{ steps.resolve_variables.outputs.version }} | |
| SHORT_SHA: ${{ steps.resolve_variables.outputs.short_commit_sha }} | |
| run: | | |
| BRANCH="${{ github.ref_name }}" | |
| if [[ "$BRANCH" == "nightly" ]]; then | |
| TAGS="${IMAGE}:nightly-latest,${IMAGE}:nightly-${SHORT_SHA}" | |
| else | |
| TAGS="${IMAGE}:${BRANCH}-latest,${IMAGE}:${VERSION}" | |
| fi | |
| echo "tags=$TAGS" >> $GITHUB_OUTPUT | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker BuildX | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| version: latest | |
| - name: Publish to Docker Hub | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: true | |
| context: "." | |
| file: "Dockerfile" | |
| sbom: true | |
| provenance: true | |
| platforms: | | |
| linux/amd64 | |
| linux/arm64 | |
| tags: ${{ steps.resolve_tags.outputs.tags }} | |
| build-args: | | |
| REVISION=${{ github.sha }} | |
| BRANCH=${{ github.ref_name }} | |
| VERSION=${{ steps.resolve_variables.outputs.version }} | |
| CREATED=${{ steps.resolve_variables.outputs.build_time }} | |
| - name: Update Dockerhub Description | |
| uses: peter-evans/dockerhub-description@v5 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USER }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| repository: "cloudnetservice/cloudnet" | |
| enable-url-completion: true |