test: update jinks-cli command to use -v flag #19
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: Builder image (Ant, Node) | |
| on: | |
| push: | |
| # Publish `main` as Docker `latest` image. | |
| branches: | |
| - main | |
| - 'release/*' | |
| # Publish `v1.2.3` tags as releases. | |
| tags: | |
| - v* | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: "5 8 * * 0" | |
| workflow_dispatch: | |
| env: | |
| IMAGE_NAME: builder | |
| jobs: | |
| # Run tests. | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| JAVA_VERSION: [11, 21] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Make buildkit default | |
| uses: docker/setup-buildx-action@v3 | |
| id: buildx | |
| with: | |
| install: true | |
| - name: Install bats | |
| run: sudo apt-get install bats | |
| - name: Build default images for testing on CI | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| build-args: | | |
| JAVA_VERSION=${{ matrix.JAVA_VERSION }} | |
| load: true | |
| tags: ${{ env.IMAGE_NAME }} | |
| - name: Run tests | |
| run: bats --tap test/*.bats | |
| push: | |
| # Ensure test job passes before pushing image. | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| with: | |
| platforms: linux/amd64,linux/arm64 | |
| - name: Make buildkit default | |
| uses: docker/setup-buildx-action@v3 | |
| id: buildx | |
| with: | |
| install: true | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ghcr.io/eeditiones/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| - name: Login to GHCR | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Push image | |
| if: github.ref == 'refs/heads/main' | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| builder: ${{ steps.buildx.outputs.name }} | |
| push: true | |
| sbom: true | |
| tags: | | |
| ${{ steps.meta.outputs.tags }} | |
| ghcr.io/eeditiones/${{ env.IMAGE_NAME }}:latest | |
| labels: ${{ steps.meta.outputs.labels }} |