generated from pulumi/pulumi-tf-provider-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[internal] Update GitHub Actions workflow files
- Loading branch information
1 parent
00fbadd
commit 060e157
Showing
5 changed files
with
174 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
generate_coverage_data: | ||
continue-on-error: true | ||
env: | ||
|
@@ -214,12 +215,15 @@ jobs: | |
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Prepare upstream code | ||
run: make upstream | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
cache-dependency-path: | | ||
provider/*.sum | ||
upstream/*.sum | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -234,8 +238,14 @@ jobs: | |
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: pulumi/schema-tools | ||
- name: Build tfgen & provider binaries | ||
run: make provider | ||
- name: Build schema generator binary | ||
run: make tfgen_build_only | ||
- name: Install plugins | ||
run: make install_plugins | ||
- name: Generate schema | ||
run: make tfgen_no_deps | ||
- name: Build provider binary | ||
run: make provider_no_deps | ||
- name: Unit-test provider code | ||
run: make test_provider | ||
- if: github.event_name == 'pull_request' | ||
|
@@ -262,6 +272,33 @@ jobs: | |
Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. | ||
- if: github.event_name == 'pull_request' | ||
name: Check Configuration section | ||
run: | | ||
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt | ||
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
{ | ||
echo "MISSING_CONFIG<<$EOF"; | ||
xargs -I {} sh -c "grep -q {} config_section.txt || echo \\\`{}\\\` not found in Configuration section" < keys.txt | ||
echo "$EOF"; | ||
} >> "$GITHUB_ENV" | ||
- if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' | ||
name: Comment on PR with Details of Configuration check | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
comment_tag: configurationCheck | ||
message: >+ | ||
### Is README.md missing any configuration options? | ||
${{ env.MISSING_CONFIG || 'No missing config!' }} | ||
${{ env.MISSING_CONFIG && 'Please add a description for each of these options to `README.md`.' }} | ||
${{ env.MISSING_CONFIG && 'Details about them can be found in either the upstream docs or `schema.json`.' }} | ||
- name: Tar provider binaries | ||
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ | ||
github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} | ||
|
@@ -496,5 +533,3 @@ on: | |
- v* | ||
- sdk/* | ||
- "**" | ||
|
||
# Ensure diff with ci-mgmt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,7 @@ jobs: | |
with: | ||
name: ${{ matrix.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz | ||
retention-days: 30 | ||
- if: failure() && github.event_name == 'push' | ||
name: Notify Slack | ||
uses: 8398a7/action-slack@v3 | ||
|
@@ -130,6 +131,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
lint: | ||
name: lint | ||
uses: ./.github/workflows/lint.yml | ||
|
@@ -152,12 +154,15 @@ jobs: | |
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Prepare upstream code | ||
run: make upstream | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
cache-dependency-path: | | ||
provider/*.sum | ||
upstream/*.sum | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -172,8 +177,14 @@ jobs: | |
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: pulumi/schema-tools | ||
- name: Build tfgen & provider binaries | ||
run: make provider | ||
- name: Build schema generator binary | ||
run: make tfgen_build_only | ||
- name: Install plugins | ||
run: make install_plugins | ||
- name: Generate schema | ||
run: make tfgen_no_deps | ||
- name: Build provider binary | ||
run: make provider_no_deps | ||
- name: Unit-test provider code | ||
run: make test_provider | ||
- if: github.event_name == 'pull_request' | ||
|
@@ -200,6 +211,33 @@ jobs: | |
Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. | ||
- if: github.event_name == 'pull_request' | ||
name: Check Configuration section | ||
run: | | ||
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt | ||
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
{ | ||
echo "MISSING_CONFIG<<$EOF"; | ||
xargs -I {} sh -c "grep -q {} config_section.txt || echo \\\`{}\\\` not found in Configuration section" < keys.txt | ||
echo "$EOF"; | ||
} >> "$GITHUB_ENV" | ||
- if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' | ||
name: Comment on PR with Details of Configuration check | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
comment_tag: configurationCheck | ||
message: >+ | ||
### Is README.md missing any configuration options? | ||
${{ env.MISSING_CONFIG || 'No missing config!' }} | ||
${{ env.MISSING_CONFIG && 'Please add a description for each of these options to `README.md`.' }} | ||
${{ env.MISSING_CONFIG && 'Details about them can be found in either the upstream docs or `schema.json`.' }} | ||
- name: Tar provider binaries | ||
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ | ||
github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ jobs: | |
with: | ||
name: ${{ matrix.language }}-sdk.tar.gz | ||
path: ${{ github.workspace}}/sdk/${{ matrix.language }}.tar.gz | ||
retention-days: 30 | ||
- if: failure() && github.event_name == 'push' | ||
name: Notify Slack | ||
uses: 8398a7/action-slack@v3 | ||
|
@@ -129,6 +130,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
create_docs_build: | ||
name: create_docs_build | ||
needs: tag_sdk | ||
|
@@ -166,12 +168,15 @@ jobs: | |
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Prepare upstream code | ||
run: make upstream | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
cache-dependency-path: | | ||
provider/*.sum | ||
upstream/*.sum | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -186,8 +191,14 @@ jobs: | |
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: pulumi/schema-tools | ||
- name: Build tfgen & provider binaries | ||
run: make provider | ||
- name: Build schema generator binary | ||
run: make tfgen_build_only | ||
- name: Install plugins | ||
run: make install_plugins | ||
- name: Generate schema | ||
run: make tfgen_no_deps | ||
- name: Build provider binary | ||
run: make provider_no_deps | ||
- name: Unit-test provider code | ||
run: make test_provider | ||
- if: github.event_name == 'pull_request' | ||
|
@@ -214,6 +225,33 @@ jobs: | |
Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. | ||
- if: github.event_name == 'pull_request' | ||
name: Check Configuration section | ||
run: | | ||
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt | ||
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
{ | ||
echo "MISSING_CONFIG<<$EOF"; | ||
xargs -I {} sh -c "grep -q {} config_section.txt || echo \\\`{}\\\` not found in Configuration section" < keys.txt | ||
echo "$EOF"; | ||
} >> "$GITHUB_ENV" | ||
- if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' | ||
name: Comment on PR with Details of Configuration check | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
comment_tag: configurationCheck | ||
message: >+ | ||
### Is README.md missing any configuration options? | ||
${{ env.MISSING_CONFIG || 'No missing config!' }} | ||
${{ env.MISSING_CONFIG && 'Please add a description for each of these options to `README.md`.' }} | ||
${{ env.MISSING_CONFIG && 'Details about them can be found in either the upstream docs or `schema.json`.' }} | ||
- name: Tar provider binaries | ||
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ | ||
github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
comment-notification: | ||
if: github.event_name == 'repository_dispatch' | ||
name: comment-notification | ||
|
@@ -177,12 +178,15 @@ jobs: | |
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Prepare upstream code | ||
run: make upstream | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
cache-dependency-path: | | ||
provider/*.sum | ||
upstream/*.sum | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -197,8 +201,14 @@ jobs: | |
uses: jaxxstorm/[email protected] | ||
with: | ||
repo: pulumi/schema-tools | ||
- name: Build tfgen & provider binaries | ||
run: make provider | ||
- name: Build schema generator binary | ||
run: make tfgen_build_only | ||
- name: Install plugins | ||
run: make install_plugins | ||
- name: Generate schema | ||
run: make tfgen_no_deps | ||
- name: Build provider binary | ||
run: make provider_no_deps | ||
- name: Unit-test provider code | ||
run: make test_provider | ||
- if: github.event_name == 'pull_request' | ||
|
@@ -225,6 +235,33 @@ jobs: | |
Maintainer note: consult the [runbook](https://github.com/pulumi/platform-providers-team/blob/main/playbooks/tf-provider-updating.md) for dealing with any breaking changes. | ||
- if: github.event_name == 'pull_request' | ||
name: Check Configuration section | ||
run: | | ||
sed -n '/## Configuration/,$p' README.md | sed -n '/## Reference/q;p' >> config_section.txt | ||
jq -r '.config[] | keys[]' < provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> keys.txt | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
{ | ||
echo "MISSING_CONFIG<<$EOF"; | ||
xargs -I {} sh -c "grep -q {} config_section.txt || echo \\\`{}\\\` not found in Configuration section" < keys.txt | ||
echo "$EOF"; | ||
} >> "$GITHUB_ENV" | ||
- if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' | ||
name: Comment on PR with Details of Configuration check | ||
uses: thollander/actions-comment-pull-request@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
comment_tag: configurationCheck | ||
message: >+ | ||
### Is README.md missing any configuration options? | ||
${{ env.MISSING_CONFIG || 'No missing config!' }} | ||
${{ env.MISSING_CONFIG && 'Please add a description for each of these options to `README.md`.' }} | ||
${{ env.MISSING_CONFIG && 'Details about them can be found in either the upstream docs or `schema.json`.' }} | ||
- name: Tar provider binaries | ||
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ | ||
github.workspace }}/bin/ pulumi-resource-${{ env.PROVIDER }} | ||
|
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