Skip to content

Commit

Permalink
Dat 4596 (#85)
Browse files Browse the repository at this point in the history
* fix(generate.yml): replace double curly braces with single curly braces in docker build and run commands to properly interpolate inputs.liquibase-version variable
chore(gitignore): add commands.json to .gitignore to exclude generated file from version control

* fix(generate.yml): change $(PWD) to $(pwd) to fix path case sensitivity issue in docker run command

* fix(generate.yml): update job name to reflect the generation of a list of liquibase commands
feat(generate.yml): add steps to read commands from JSON file, iterate over commands, and execute Docker command for each
feat(generate.yml): update artifact name to include liquibase version dynamically
feat(gitignore): add *.proto files to the list of ignored files

* fix(generate.yml): use env variable COMMANDS instead of shell variable $COMMANDS to iterate over commands for better consistency and reliability

* refactor(generate.yml): remove unnecessary step to read commands from JSON file and directly iterate over commands to execute Docker command

* chore(generate.yml): move generated *.proto files to /proto/commands directory for better organization
feat(package.json): add dependencies for proto (^1.0.19) and ts-proto (^1.167.9) to support protobuf generation and TypeScript integration

* fix(generate.yml): change directory structure for generated .proto files to improve organization
feat(generate.yml): add configuration for git user and push changes to repository after generating protobuf files for liquibase version

* fix(generate.yml): update git add command to correctly add proto-commands directory
feat(generate.yml): include liquibase version in commit message when generating protobuf files

* chore(generate.yml): add step to create a pull request automatically for protobuf files
chore(gitignore): remove *.proto from gitignore to track protobuf files

* fix(generate.yml): update default branch name from 'main' to 'master' to align with repository conventions

* fix(generate.yml): add 'git pull' command before adding and committing changes to prevent conflicts and ensure up-to-date repository state

* Generated protobuf files for liquibase version 4.26.0

* chore(generate.yml): update GH_TOKEN secret to BOT_TOKEN for consistency
docs(generate.yml): improve commit message for auto pull requests to include liquibase version in title and body

* fix(generate.yml): add condition to only configure git user and push changes if not on master branch
feat(generate.yml): add condition to create pull request only if not on master branch

* chore(generate.yml): add permissions for contents and pull-requests to improve workflow security
chore(generate.yml): remove unused token secret from create-pull-request action to enhance security and prevent potential misuse

* add wallet files

* add wallet files

* add wallet files

* feat(workflows): add installation of protoc and npm to workflow for generating protobuf files
fix(workflows): update command to generate TypeScript files from protobuf files to use correct plugin and output directory

---------

Co-authored-by: liquibot <[email protected]>
  • Loading branch information
jandroav and liquibot authored Mar 4, 2024
1 parent 3db5b84 commit 94a98cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install protoc and npm
run: |
sudo apt-get install -y protobuf-compiler npm
npm install proto
- name: Build liquibase-protobuf-generator
run: docker build -t liquibase-protobuf-generator:${{ inputs.liquibase-version }} . --build-arg VERSION=${{ inputs.liquibase-version }}

Expand All @@ -31,9 +36,10 @@ jobs:
IFS=$'\n'
for command in $COMMANDS; do
docker run --rm -v $(pwd):/proto liquibase-protobuf-generator:${{ inputs.liquibase-version }} generate-protobuf --target-command="$command" --output-dir /proto
protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=. --ts_proto_opt=exportCommonSymbols=false ./$command.proto
done
mkdir -p proto-commands
mv *.proto ./proto-commands
mv *.ts ./proto-commands
- name: Configure git user
if: github.ref != 'refs/heads/master'
Expand Down

0 comments on commit 94a98cc

Please sign in to comment.