Repository navigation
Bump distroless/java25-debian13 from 70036fe to 3e0a149 in /.gith…
#1926
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: ci | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| inputs: | |
| plugins: | |
| description: "Plugins to build and publish (i.e. connect-go:latest, connect-go, grpc/java:v1.53.0)" | |
| default: '' | |
| type: string | |
| env: | |
| DOCKER_ORG: "ghcr.io/bufbuild" | |
| # Ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions | |
| permissions: | |
| actions: read | |
| contents: read | |
| packages: write | |
| concurrency: ci-${{ github.ref }} | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest-4-cores | |
| steps: | |
| - name: set PLUGINS from workflow inputs | |
| if: ${{ inputs.plugins }} | |
| run: echo "PLUGINS=${{ inputs.plugins }}" >> $GITHUB_ENV | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| check-latest: true | |
| - name: Calculate changed plugins and set PLUGINS env var from last successful commit push | |
| if: ${{ inputs.plugins == '' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| base_ref=$(gh api "repos/${{ github.repository }}/actions/workflows/ci.yml/runs?branch=${{ github.ref_name }}&status=success&per_page=1" --jq '.workflow_runs[0].head_sha') | |
| val=$(go run ./internal/cmd/changed-plugins --base-ref "${base_ref}") | |
| if [[ -n "${val}" && -z "${PLUGINS}" ]]; then | |
| echo "PLUGINS=${val}" >> $GITHUB_ENV | |
| fi | |
| - name: Get buf version | |
| shell: bash | |
| run: | | |
| echo BUF_VERSION=$(go list -m -f '{{.Version}}' github.com/bufbuild/buf | cut -c2-) >> $GITHUB_ENV | |
| - uses: bufbuild/buf-action@v1 | |
| with: | |
| setup_only: true | |
| - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 | |
| - name: Login to GitHub Container Registry | |
| if: github.repository == 'bufbuild/plugins' | |
| uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Test | |
| run: make test | |
| - name: Push to GHCR | |
| if: github.repository == 'bufbuild/plugins' | |
| run: make dockerpush |