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 f2018da
Showing
5 changed files
with
168 additions
and
2 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 |
---|---|---|
|
@@ -52,6 +52,12 @@ jobs: | |
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -130,6 +136,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
generate_coverage_data: | ||
continue-on-error: true | ||
env: | ||
|
@@ -206,6 +213,12 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -262,6 +275,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 +536,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 |
---|---|---|
|
@@ -53,6 +53,12 @@ jobs: | |
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -114,6 +120,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 +137,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
lint: | ||
name: lint | ||
uses: ./.github/workflows/lint.yml | ||
|
@@ -144,6 +152,12 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -200,6 +214,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 |
---|---|---|
|
@@ -52,6 +52,12 @@ jobs: | |
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -113,6 +119,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 +136,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
create_docs_build: | ||
name: create_docs_build | ||
needs: tag_sdk | ||
|
@@ -158,6 +166,12 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -214,6 +228,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 |
---|---|---|
|
@@ -62,6 +62,12 @@ jobs: | |
cache-dependency-path: | | ||
sdk/go.sum | ||
go-version: 1.21.x | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Install pulumictl | ||
uses: jaxxstorm/[email protected] | ||
with: | ||
|
@@ -140,6 +146,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
comment-notification: | ||
if: github.event_name == 'repository_dispatch' | ||
name: comment-notification | ||
|
@@ -169,6 +176,12 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -225,6 +238,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