https://pulumi.com logo
#automation-api
Title
# automation-api
a

ancient-monkey-64322

08/10/2021, 11:42 AM
Is there a way to check if a stack is currently locked? eg if I wanted to block deploying a commit within github actions until an earlier deploy had finished
🙏 1
(@brave-planet-10645 I’m looking at ways to keep it to one stack per PR)
b

brave-planet-10645

08/10/2021, 1:04 PM
Interesting idea. Let me find out
👍 2
l

lemon-agent-27707

08/10/2021, 10:24 PM
The result property of the latest update summary will indicate whether or not an update is currently running or has finished https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/auto#UpdateSummary
Copy code
{
    "version": 2,
    "kind": "update",
    "startTime": "2021-08-10T16:45:19.000Z",
    "message": "",
    "environment": {
      "exec.kind": "cli"
    },
    "config": {},
    "result": "in-progress"
  },
  {
    "version": 1,
    "kind": "update",
    "startTime": "2021-08-10T16:41:59.000Z",
    "message": "",
    "environment": {
      "exec.kind": "cli"
    },
    "config": {},
    "result": "succeeded",
    "endTime": "2021-08-10T16:44:32.000Z",
    "resourceChanges": {
      "create": 1
    }
  }
p

proud-pizza-80589

08/11/2021, 8:00 AM
we use turnstyle
Copy code
- name: Turnstyle
        if: ${{ github.event_name == 'push' }}
        uses: softprops/turnstyle@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
b

brave-planet-10645

08/11/2021, 9:08 AM
Evan beat me to it, but that was what I was about to post
@proud-pizza-80589 that looks awesome, thanks for posting.
p

proud-pizza-80589

08/11/2021, 9:13 AM
i got it from the pulumi docs TBH, but it got removed there https://github.com/pulumi/docs/pull/4410
a

ancient-monkey-64322

08/11/2021, 9:46 AM
Fantastic! Thanks all, I’ll take a look