Add v4.0 (with S3 support!) #70
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
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '*.md' | |
| - .github/workflows/*.yaml | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| VERSION: | |
| description: 'Version to build' | |
| required: false | |
| type: string | |
| env: | |
| VERSION: ${{ inputs.VERSION }} | |
| jobs: | |
| docker-build: | |
| runs-on: ${{ matrix.runs_on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runs_on: ubuntu-24.04-arm | |
| docker_arch: arm64v8 | |
| - runs_on: ubuntu-24.04 | |
| docker_arch: amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set repository name | |
| if: vars.DOCKERHUB_TEST_REGISTRY | |
| run: | |
| echo "REGISTRY=${{ vars.DOCKERHUB_TEST_REGISTRY }}" >> $GITHUB_ENV; | |
| if [[ -n "${{ github.event.pull_request.number }}" ]]; then | |
| echo "TAG=github-pr-${{ github.event.pull_request.number }}" >> $GITHUB_ENV; | |
| else | |
| echo "TAG=ref-${{ github.ref_name }}" >> $GITHUB_ENV; | |
| fi | |
| - name: Run docker for ${{matrix.docker_arch}} | |
| env: | |
| TAG: ${{ env.TAG }} | |
| run: make ${{matrix.docker_arch}}-docker | |
| # Push Artifacts to GitHub | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-${{ matrix.docker_arch }}-${{ env.TAG }} | |
| path: release/ | |
| # Push to DockerHub | |
| - name: Login to Docker Hub | |
| if: vars.DOCKERHUB_TEST_REGISTRY | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_TEST_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TEST_TOKEN }} | |
| - name: Run dockerhub for ${{matrix.docker_arch}} | |
| if: vars.DOCKERHUB_TEST_REGISTRY | |
| run: make ${{matrix.docker_arch}}-dockerhub | |
| client-build: | |
| runs-on: ${{ matrix.runs_on }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runs_on: ubuntu-24.04-arm | |
| docker_arch: arm64v8 | |
| - runs_on: ubuntu-24.04 | |
| docker_arch: amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| # Compile the client | |
| - name: Run client for ${{matrix.docker_arch}} | |
| run: make ${{matrix.docker_arch}}-client | |
| # Push Artifacts to GitHub | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-${{ matrix.docker_arch }}-${{ env.TAG }} | |
| path: release/ | |
| manifest: | |
| runs-on: ubuntu-latest | |
| needs: [client-build, docker-build] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set repository name | |
| if: vars.DOCKERHUB_TEST_REGISTRY | |
| run: | |
| echo "REGISTRY=${{ vars.DOCKERHUB_TEST_REGISTRY }}" >> $GITHUB_ENV; | |
| if [[ -n "${{ github.event.pull_request.number }}" ]]; then | |
| echo "TAG=github-pr-${{ github.event.pull_request.number }}" >> $GITHUB_ENV; | |
| else | |
| echo "TAG=ref-${{ github.ref_name }}" >> $GITHUB_ENV; | |
| fi | |
| - name: Login to Docker Hub | |
| if: vars.DOCKERHUB_TEST_REGISTRY | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_TEST_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TEST_TOKEN }} | |
| - name: Run dockerhub-manifest | |
| run: make dockerhub-manifest | |
| - name: Comment image name on PR | |
| if: github.event_name == 'pull_request' | |
| env: | |
| REGISTRY: ${{ env.REGISTRY }} | |
| TAG: ${{ env.TAG }} | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const imageName = `${{ env.REGISTRY }}:${{ env.TAG }}`; | |
| const body = `✅ Docker image pushed: \`${imageName}\``; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: body | |
| }); |