chore: decrease sleep amount #83
Workflow file for this run
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: Release | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| # run only against tags | |
| tags: | |
| - "v*" | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'ctrlplanedev' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| - name: Install GoReleaser | |
| uses: goreleaser/goreleaser-action@v5 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| docker: | |
| needs: linux | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'ctrlplanedev' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| matrix: | |
| platform: [linux/amd64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Check if Docker Hub secrets are available | |
| run: | | |
| if [ -z "${{ secrets.DOCKERHUB_USERNAME }}" ] || [ -z "${{ secrets.DOCKERHUB_TOKEN }}" ]; then | |
| echo "DOCKERHUB_LOGIN=false" >> $GITHUB_ENV | |
| else | |
| echo "Credentials are available" | |
| echo "DOCKERHUB_LOGIN=true" >> $GITHUB_ENV | |
| fi | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| if: env.DOCKERHUB_LOGIN == 'true' | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ctrlplane/cli | |
| tags: | | |
| type=raw,value=latest | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=semver,pattern={{major}} | |
| - name: Build Only | |
| uses: docker/build-push-action@v6 | |
| if: env.DOCKERHUB_LOGIN != 'true' | |
| with: | |
| push: false | |
| file: docker/Dockerfile | |
| platforms: ${{ matrix.platform }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| build-args: | | |
| CLI_VERSION=v${{ steps.meta.outputs.version }} | |
| - name: Build and Push | |
| uses: docker/build-push-action@v6 | |
| if: env.DOCKERHUB_LOGIN == 'true' | |
| with: | |
| push: true | |
| file: docker/Dockerfile | |
| platforms: ${{ matrix.platform }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| build-args: | | |
| CLI_VERSION=v${{ steps.meta.outputs.version }} |