Skip to content

Commit

Permalink
Use new reusable actions
Browse files Browse the repository at this point in the history
1. Use version action for all workflows - the new action works for both dev and release versions.
2. Use new check-git-status action.
  • Loading branch information
danielrbradley committed Apr 30, 2024
1 parent 509a5d2 commit c8b8aa9
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 70 deletions.
21 changes: 0 additions & 21 deletions .github/actions/check-worktree-clean/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/acceptance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

version:
if: github.event_name == 'repository_dispatch' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
uses: ./.github/workflows/dev-version.yml
uses: ./.github/workflows/version.yml
secrets: inherit

build_test:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
compare_to: ${{ github.base_ref }}

- name: Check worktree clean
uses: ./.github/actions/check-worktree-clean
uses: pulumi/git-status-check-action@v1

- if: failure() && github.event_name == 'push'
name: Notify Slack
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
run: make build_${{ matrix.language }}

- name: Check worktree clean
uses: ./.github/actions/check-worktree-clean
uses: pulumi/git-status-check-action@v1

- name: Tar SDK folder
if: ${{ matrix.language != 'go' }}
Expand Down Expand Up @@ -250,7 +250,7 @@ jobs:
go mod edit -replace github.com/pulumi/examples/misc/test=../p-examples/misc/test/ && \
go mod tidy && \
go test -v -json -cover -timeout 2h -tags=${{ matrix.language }} -run TestPulumiExamples -parallel 16 . 2>&1 | tee /tmp/gotest.log | gotestfmt
test_provider:
runs-on: ubuntu-latest
name: Test Provider
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/dev-version.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:

jobs:
version:
uses: ./.github/workflows/dev-version.yml
uses: ./.github/workflows/version.yml
secrets: inherit

build_test:
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,8 @@ on:

jobs:
version:
runs-on: ubuntu-latest
steps:
- id: version
name: Calculate build version
# Remove "v" if present
run: echo "version=${GITHUB_REF_NAME/v/}" >> "$GITHUB_OUTPUT"
outputs:
version: ${{ steps.version.outputs.version }}
uses: ./.github/workflows/version.yml
secrets: inherit

build_test:
uses: ./.github/workflows/build-test.yml
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: dev-version

on:
workflow_call:
outputs:
version:
description: Calculated version
value: ${{ jobs.version.outputs.version }}

env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}

jobs:
version:
runs-on: ubuntu-latest
name: Calculate Dev Version
steps:
- id: version
name: Calculate build version
uses: pulumi/provider-version-action@v1
outputs:
version: ${{ steps.version.outputs.VERSION }}

0 comments on commit c8b8aa9

Please sign in to comment.