Skip to content

Commit

Permalink
Update GitHub Actions workflows. (#557)
Browse files Browse the repository at this point in the history
This PR was automatically generated by the
update-workflows-ecosystem-providers workflow in the pulumi/ci-mgmt
repo, from commit e7696dfaff0baa5b84126fc6971cc40e89d490cf.
  • Loading branch information
pulumi-bot authored Dec 4, 2024
1 parent ce6dcf1 commit e7a4b70
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 11 deletions.
19 changes: 13 additions & 6 deletions .github/actions/download-bin/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name: Download binary assets
description: Downloads the provider and tfgen binaries to `bin/`.
name: Download the provider binary
description: Downloads the provider binary to `bin/`.

runs:
using: "composite"
steps:
- name: Download provider + tfgen binaries

- name: Download pulumi-resource-consul
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: consul-provider.tar.gz
pattern: pulumi-resource-consul-*-linux-amd64.tar.gz
path: ${{ github.workspace }}/bin
- name: Untar provider binaries
merge-multiple: true

- name: Untar pulumi-resource-consul
shell: bash
run: |
tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin
- name: Mark pulumi-resource-consul as executable
shell: bash
run: |
tar -zxf ${{ github.workspace }}/bin/provider.tar.gz -C ${{ github.workspace}}/bin
find ${{ github.workspace }} -name "pulumi-*-consul" -print -exec chmod +x {} \;
17 changes: 17 additions & 0 deletions .github/actions/download-tfgen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Download the tfgen binary
description: Downloads the tfgen binary to `bin/`.

runs:
using: "composite"
steps:

- name: Download pulumi-tfgen-consul
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: pulumi-tfgen-consul
path: ${{ github.workspace }}/bin

- name: Ensure pulumi-tfgen-consul is executable
shell: bash
run: |
find ${{ github.workspace }} -name "pulumi-*-consul" -print -exec chmod +x {} \;
1 change: 1 addition & 0 deletions .github/workflows/build_provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
runs-on: ubuntu-latest
env:
PROVIDER_VERSION: ${{ inputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: true
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
tools: pulumictl, pulumicli, ${{ matrix.language }}
- name: Prepare local workspace
run: make prepare_local_workspace
- name: Download bin
uses: ./.github/actions/download-bin
- name: Download tfgen
uses: ./.github/actions/download-tfgen
- name: Update path
run: echo "${{ github.workspace }}/bin" >> "$GITHUB_PATH"
- name: Restore makefile progress
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ jobs:
name: test
needs:
- prerequisites
- build_provider
- build_sdk
permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
name: test
needs:
- prerequisites
- build_provider
- build_sdk
permissions:
contents: read
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ 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.
- name: Upload bin
uses: ./.github/actions/upload-bin
- name: Upload pulumi-tfgen-consul
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: pulumi-tfgen-consul
path: ${{ github.workspace }}/bin/pulumi-tfgen-consul
retention-days: 30

- name: Upload schema-embed.json
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
name: test
needs:
- prerequisites
- build_provider
- build_sdk
permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ jobs:
name: test
needs:
- prerequisites
- build_provider
- build_sdk
permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,14 @@ apply_patches() {
# Iterating over the patches folder in sorted order,
# apply the patch using a 3-way merge strategy. This mirrors the default behavior of 'git merge'
cd upstream
# Allow directory to be empty
shopt -s nullglob
for patch in ../patches/*.patch; do
if ! git apply --3way "${patch}" --allow-empty; then
err_failed_to_apply "$(basename "${patch}")"
fi
done
shopt -u nullglob
}

clean_rebases() {
Expand Down Expand Up @@ -227,13 +230,16 @@ checkout() {
# Create a new branch 'pulumi/patch-checkout' which will contain the commits for each patch
git checkout -B pulumi/patch-checkout

# Allow directory to be empty
shopt -s nullglob
for patch in ../patches/*.patch; do
if ! git am --3way "${patch}"; then
err_failed_to_apply "$(basename "${patch}")"
fi
done
shopt -u nullglob

cat <<EOF
cat <<EOF
The patches have been checked out as commits in the './upstream' repository.
The 'pulumi/patch-checkout' branch is pointing to the last patch.
Expand Down

0 comments on commit e7a4b70

Please sign in to comment.