Skip to content

Commit

Permalink
[internal] Update GitHub Actions workflow files (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot authored May 8, 2024
1 parent 4c29cdb commit 9adb5d9
Show file tree
Hide file tree
Showing 13 changed files with 315 additions and 195 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/check-upstream-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
go-version: 1.21.x
- name: Checkout Repo
uses: actions/checkout@v4
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
shell: bash
- name: Install upgrade-provider
run: go install github.com/pulumi/upgrade-provider@main
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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 }}
Expand All @@ -46,8 +46,6 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ env.PR_COMMIT_SHA }}
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v5
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,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 }}
Expand All @@ -47,7 +47,7 @@ jobs:
uses: actions/setup-go@v5
with:
# The versions of golangci-lint and setup-go here cross-depend and need to update together.
go-version: 1.21
go-version: 1.22
# Either this action or golangci-lint needs to disable the cache
cache: false
- name: disarm go:embed directives to enable lint
Expand All @@ -58,9 +58,9 @@ jobs:
continue-on-error: true
run: make upstream
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
uses: golangci/golangci-lint-action@v6
with:
version: v1.55.2
version: v1.58.0
working-directory: provider
- if: failure() && github.event_name == 'push'
name: Notify Slack
Expand Down
117 changes: 69 additions & 48 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -130,6 +128,7 @@ jobs:
- dotnet
- go
- java

generate_coverage_data:
continue-on-error: true
env:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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'
Expand All @@ -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 }}
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -496,5 +519,3 @@ on:
- v*
- sdk/*
- "**"

# Ensure diff with ci-mgmt
Loading

0 comments on commit 9adb5d9

Please sign in to comment.