auto #1350
This file contains 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: "auto" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
auto: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v3 | |
- name: install nix | |
uses: cachix/install-nix-action@v20 | |
- name: Prepare (Cachix) | |
uses: cachix/cachix-action@v12 | |
with: | |
name: jechol | |
- name: remove lib and mix.lock | |
run: | | |
rm -rf lib | |
rm mix.lock | |
mkdir lib | |
- name: install dependencies | |
run: | | |
nix-env -i -f shell.nix -A buildInputs | |
mix local.rebar --force | |
mix local.hex --force | |
mix do deps.get compile | |
mix escript.install hex protobuf --force | |
- name: clone googleapis | |
run: git clone https://github.com/googleapis/googleapis.git | |
- name: compile googleapis | |
run: find ./googleapis -name '*.proto' -exec protoc --elixir_out=plugins=grpc:./lib --plugin=/home/runner/.mix/escripts/protoc-gen-elixir --proto_path=./googleapis "{}" \; | |
- name: clone protobuf | |
run: git clone https://github.com/protocolbuffers/protobuf.git | |
- name: compile protobuf | |
run: | | |
mkdir ./lib/google/protobuf | |
for file in "any.proto" "api.proto" "descriptor.proto" "duration.proto" "empty.proto" "field_mask.proto" "source_context.proto" "struct.proto" "timestamp.proto" "type.proto" "wrappers.proto"; do \ | |
protoc --elixir_out=plugins=grpc:./lib/google/protobuf --plugin=/home/runner/.mix/escripts/protoc-gen-elixir --proto_path=./protobuf/src/google/protobuf $file; \ | |
done | |
- name: pull request | |
uses: peter-evans/create-pull-request@v4.0.3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: AUTO GENERATED ELIXIR GOOGLEAPIS PROTOBUF | |
author: Hany Rock <rudebono@gmail.com> | |
branch: auto | |
branch-suffix: timestamp | |
title: "AUTO GENERATED ELIXIR GOOGLEAPIS PROTOBUF" | |
assignees: rudebono | |
reviewers: rudebono |