summaryrefslogtreecommitdiff
path: root/.github/workflows/release_grpc_buf.yml
blob: 1e333706d03773802d0feaf356684c23d13d5e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: release_grpc_buf

on:
  release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
    types:
      - prereleased
      - released

jobs:
  build:
    name: BSR build
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]
    steps:
      - name: Set up Go
        uses: actions/setup-go@v3
        with:
          go-version: 1.19

      - name: Check out code
        uses: actions/checkout@v3
        with:
          repository: 'roadrunner-server/grpc'
          ref: 'master'

      - name: Generate builder values
        id: values
        run: |
          echo "::set-output name=version::`echo ${GITHUB_REF##*/} | sed -e 's/*//'`"

      - name: Build image
        run: |
          echo ${{ secrets.BSR_TOKEN }} | docker login -u roadrunner-server plugins.buf.build --password-stdin
          docker build . -f protoc_plugins/Dockerfile -t plugins.buf.build/roadrunner/protoc-gen-php-grpc:${{ steps.values.outputs.version }} --build-arg "APP_VERSION=${{ steps.values.outputs.version }}"
          docker push plugins.buf.build/roadrunner/protoc-gen-php-grpc:${{ steps.values.outputs.version }}