Skip to content

Bump distroless/python3-debian13 from 02b579c to d765878 in /base… #2059

Bump distroless/python3-debian13 from 02b579c to d765878 in /base…

Bump distroless/python3-debian13 from 02b579c to d765878 in /base… #2059

Workflow file for this run

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@v7
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 }}
REPOSITORY: ${{ github.repository }}
REF_NAME: ${{ github.ref_name }}
run: |
base_ref=$(gh api "repos/${REPOSITORY}/actions/workflows/ci.yml/runs?branch=${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@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Login to Docker Hub
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
- name: Login to GitHub Container Registry
if: github.repository == 'bufbuild/plugins'
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.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