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

Update GitHub Actions workflows. #620

Merged
merged 1 commit into from
Nov 27, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/actions/download-bin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ runs:
using: "composite"
steps:
- name: Download provider + tfgen binaries
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
name: keycloak-provider.tar.gz
path: ${{ github.workspace }}/bin
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/download-sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
using: "composite"
steps:
- name: Download ${{ inputs.language }} SDK
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
name: ${{ inputs.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-bin/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
shell: bash
run: tar -zcf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace }}/bin/ pulumi-resource-keycloak pulumi-tfgen-keycloak
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: keycloak-provider.tar.gz
path: ${{ github.workspace }}/bin/provider.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upload-sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ runs:
shell: bash
run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} .
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: ${{ inputs.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/build_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
arch: amd64
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Setup tools
Expand All @@ -40,22 +40,19 @@ jobs:
- name: Prepare local workspace before restoring previously built
run: make prepare_local_workspace
- name: Download schema-embed.json
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
# Use a pattern to avoid failing if the artifact doesn't exist
pattern: schema-embed.*
# Avoid creating directories for each artifact
merge-multiple: true
path: provider/cmd/pulumi-resource-keycloak/schema-embed.json
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build & package provider
run: make provider_dist-${{ matrix.platform.os }}-${{ matrix.platform.arch }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: pulumi-resource-keycloak-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
path: bin/pulumi-resource-keycloak-v${{ inputs.version }}-${{ matrix.platform.os }}-${{ matrix.platform.arch }}.tar.gz
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- java
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Cache examples generation
Expand All @@ -66,10 +66,7 @@ jobs:
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: prerequisites.make
path: .make
run: make --touch provider schema
- name: Build SDK
run: make build_${{ matrix.language }}
- name: Check worktree clean
Expand All @@ -85,9 +82,3 @@ jobs:
uses: ./.github/actions/upload-sdk
with:
language: ${{ matrix.language }}
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
include-hidden-files: true
2 changes: 1 addition & 1 deletion .github/workflows/command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- uses: peter-evans/slash-command-dispatch@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/community-moderation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- id: schema_changed
name: Check for diff in schema
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v2.12.0
with:
filters: "changed: 'provider/cmd/**/schema.json'"
- id: sdk_changed
if: steps.schema_changed.outputs.changed == 'false'
name: Check for diff in sdk/**
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v2.12.0
with:
filters: "changed: 'sdk/**'"
- if: steps.sdk_changed.outputs.changed == 'true' &&
github.event.pull_request.head.repo.full_name != github.repository
name: Send codegen warning as comment on PR
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v2.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: >
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Setup tools
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Install go
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ jobs:
tool-cache: false
swap-storage: false
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_CORP_S3_UPLOAD_ACCESS_KEY_ID }}
aws-region: us-west-2
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Setup tools
Expand All @@ -158,10 +158,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Setup tools
Expand All @@ -100,10 +100,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
version: ${{ steps.provider-version.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- uses: pulumi/provider-version-action@v1
Expand All @@ -69,6 +69,8 @@ jobs:
run: make prepare_local_workspace
- name: Generate schema
run: make schema
- name: Build registry docs
run: make build_registry_docs
- name: Build provider binary
run: make provider
- name: Unit-test provider code
Expand All @@ -82,15 +84,9 @@ jobs:
schema-tools compare -r github://api.github.com/pulumi -p keycloak -o "${{ inputs.default_branch }}" -n --local-path=provider/cmd/pulumi-resource-keycloak/schema.json;
echo "$EOF";
} >> "$GITHUB_ENV"
- name: Save makefile progress
uses: actions/upload-artifact@v4
with:
name: prerequisites.make
path: .make
include-hidden-files: true
- if: inputs.is_pr && inputs.is_automated == false
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v2.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
comment_tag: schemaCheck
Expand All @@ -104,7 +100,7 @@ jobs:
uses: ./.github/actions/upload-bin

- name: Upload schema-embed.json
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: schema-embed.json
path: provider/cmd/pulumi-resource-keycloak/schema-embed.json
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ jobs:
if: inputs.skipGoSdk && inputs.isPrerelease == false
run: echo "Can't skip Go SDK for stable releases. This is likely a bug in the calling workflow." && exit 1
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Setup tools
uses: ./.github/actions/setup-tools
with:
tools: pulumictl, pulumicli, go, schema-tools
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v4.0.2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: us-east-2
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Create dist directory
run: mkdir -p dist
- name: Download provider assets
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
pattern: pulumi-resource-keycloak-v${{ inputs.version }}-*
path: dist
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
# Persist credentials so we can push back to the repo
persist-credentials: true
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Clean up release labels
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v2.5.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: >
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Setup tools
Expand All @@ -106,10 +106,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
persist-credentials: false
- name: Should release PR
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/resync-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
# Persist credentials so we can push a new branch.
persist-credentials: true
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
path: ci-mgmt
repository: pulumi/ci-mgmt
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ jobs:
PROVIDER_VERSION: ${{ needs.prerequisites.outputs.version }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
ref: ${{ env.PR_COMMIT_SHA }}
persist-credentials: false
- name: Checkout p/examples
if: matrix.testTarget == 'pulumiExamples'
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
repository: pulumi/examples
path: p-examples
Expand All @@ -155,10 +155,7 @@ jobs:
with:
language: ${{ matrix.language }}
- name: Restore makefile progress
uses: actions/download-artifact@v4
with:
name: build_${{ matrix.language }}.make
path: .make
run: make --touch provider schema build_${{ matrix.language }}
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Install Python deps
Expand Down
Loading
Loading