Skip to content

Issue with github-action-atmos-affected-trigger-spacelift Not Triggering Affected Stacks #32

Discussion options

milldr
Feb 6, 2025
Maintainer Sponsor

You must be logged in to vote

We had a misunderstanding with the git references and further discussed this in Slack. Following up here for any future reference:

The issue is that by the time the PR has merged, the sha of the main branch (base-ref) has been updated, so we're comparing the wrong diff. Instead, we need to get the previous sha of the main branch, but since the workflow is running on the PR we need to first fetch the history of the base ref.

Here's the solution:

name: "Deploy Affected Spacelift Stacks"

on:
  pull_request:
    types: [closed]
    branches:
      - main

jobs:
  run:
    if: github.event.pull_request.merged == true
    runs-on: ["self-hosted", "default"]
    steps:
      - name: Checkout re…

Replies: 4 comments 5 replies

Comment options

milldr
Feb 6, 2025
Maintainer Author Sponsor

You must be logged in to vote
0 replies
Comment options

milldr
Feb 6, 2025
Maintainer Author Sponsor

You must be logged in to vote
0 replies
Comment options

milldr
Feb 6, 2025
Maintainer Author Sponsor

You must be logged in to vote
0 replies
Comment options

milldr
Feb 6, 2025
Maintainer Author Sponsor

You must be logged in to vote
5 replies
@RoseSecurity
Comment options

@milldr
Comment options

milldr Feb 7, 2025
Maintainer Author Sponsor

@milldr
Comment options

milldr Feb 7, 2025
Maintainer Author Sponsor

@milldr
Comment options

milldr Feb 12, 2025
Maintainer Author Sponsor

Answer selected by milldr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants