Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RESOURCE-524 magic-module-automation-for-gcp #7

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Generate files and raise PR

on: [push]

jobs:
generate-files:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Execute code
run: |
# Run the code that generates the files
chmod +x generator.sh && ./generator.sh
- name: Create new branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: 'release-notes'
sha: '${{ github.event.pull_request.head.sha }}'
repository: inspec/inspec-gcp
- name: Upload files
uses: actions/upload-artifact@v1
with:
name: files
path: mmv1/build/inspec
- name: Raise pull request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: feature-branch
title: "Move files to new directory"
message: "This pull request moves files to a new directory"
labels: "enhancement"
13 changes: 13 additions & 0 deletions generator.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gem install bundler
cd mmv1
bundle install
./tools/doctor

make terraform VERSION=ga OUTPUT_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google"
make terraform VERSION=beta OUTPUT_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google-beta"

# Only generate a specific product (plus all common files)
make terraform VERSION=ga OUTPUT_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google" PRODUCT=dataproc

rm -rf build/inspec
ruby compiler.rb -e inspec -p products/kms -t Location -o build/inspec
78 changes: 0 additions & 78 deletions mmv1/Gemfile.lock

This file was deleted.