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 (#103)
- Loading branch information
1 parent
4c29cdb
commit 9adb5d9
Showing
13 changed files
with
315 additions
and
195 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
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
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
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
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ env: | |
PULUMI_MISSING_DOCS_ERROR: true | ||
PYPI_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | ||
PYPI_USERNAME: __token__ | ||
PYTHONVERSION: "3.11" | ||
PYTHONVERSION: 3.11.8 | ||
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }} | ||
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }} | ||
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }} | ||
|
@@ -38,20 +38,21 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
- uses: pulumi/provider-version-action@v1 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
set-env: 'PROVIDER_VERSION' | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
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: | ||
|
@@ -99,13 +100,10 @@ jobs: | |
run: make install_plugins | ||
- name: Update path | ||
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH" | ||
- name: Set PACKAGE_VERSION to Env | ||
run: echo "PACKAGE_VERSION=$(pulumictl get version --language generic)" >> | ||
"$GITHUB_ENV" | ||
- name: Build SDK | ||
run: make build_${{ matrix.language }} | ||
- name: Check worktree clean | ||
run: ./ci-scripts/ci/check-worktree-is-clean | ||
uses: pulumi/git-status-check-action@v1 | ||
- name: Compress SDK folder | ||
run: tar -zcf sdk/${{ matrix.language }}.tar.gz -C sdk/${{ matrix.language }} . | ||
- name: Upload artifacts | ||
|
@@ -130,6 +128,7 @@ jobs: | |
- dotnet | ||
- go | ||
- java | ||
|
||
generate_coverage_data: | ||
continue-on-error: true | ||
env: | ||
|
@@ -151,14 +150,6 @@ jobs: | |
aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }} | ||
aws-region: us-west-2 | ||
aws-secret-access-key: ${{ secrets.AWS_CORP_S3_UPLOAD_SECRET_ACCESS_KEY }} | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -206,20 +197,24 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
- uses: pulumi/provider-version-action@v1 | ||
with: | ||
set-env: 'PROVIDER_VERSION' | ||
- name: Cache examples generation | ||
uses: actions/cache@v4 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
path: | | ||
.pulumi/examples-cache | ||
key: ${{ runner.os }}-${{ hashFiles('provider/go.sum') }} | ||
- 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 +229,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' | ||
|
@@ -254,14 +255,38 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
comment_tag: schemaCheck | ||
message: >+ | ||
### Does the PR have any schema changes? | ||
${{ env.SCHEMA_CHANGES }} | ||
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 | select(.variables) | .variables | 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 }} | ||
|
@@ -297,8 +322,6 @@ jobs: | |
swap-storage: false | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -324,10 +347,12 @@ jobs: | |
role-external-id: upload-pulumi-release | ||
role-session-name: ${{ env.PROVIDER }}@githubActions | ||
role-to-assume: ${{ secrets.AWS_UPLOAD_ROLE_ARN }} | ||
- name: Set PreRelease Version | ||
run: echo "GORELEASER_CURRENT_TAG=v$(pulumictl get version --language generic)" >> "$GITHUB_ENV" | ||
- id: version | ||
uses: pulumi/provider-version-action@v1 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v5 | ||
env: | ||
GORELEASER_CURRENT_TAG: v${{ steps.version.outputs.version }} | ||
with: | ||
args: -p 3 -f .goreleaser.prerelease.yml --rm-dist --skip-validate --timeout | ||
60m0s | ||
|
@@ -344,10 +369,13 @@ jobs: | |
needs: publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: version | ||
uses: pulumi/provider-version-action@v1 | ||
- name: Publish SDKs | ||
uses: pulumi/[email protected].14 | ||
uses: pulumi/[email protected].15 | ||
with: | ||
sdk: all | ||
version: ${{ steps.version.outputs.version }} | ||
- env: | ||
SLACK_CHANNEL: provider-upgrade-publish-status | ||
SLACK_COLOR: "#FF0000" | ||
|
@@ -387,14 +415,9 @@ jobs: | |
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
- name: Checkout Scripts Repo | ||
uses: actions/checkout@v4 | ||
- uses: pulumi/provider-version-action@v1 | ||
with: | ||
path: ci-scripts | ||
repository: pulumi/scripts | ||
ref: deca2c5c6015ad7aaea6f572a1c2b198ca323592 | ||
- name: Unshallow clone for tags | ||
run: git fetch --prune --unshallow --tags | ||
set-env: 'PROVIDER_VERSION' | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
|
@@ -496,5 +519,3 @@ on: | |
- v* | ||
- sdk/* | ||
- "**" | ||
|
||
# Ensure diff with ci-mgmt |
Oops, something went wrong.