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

last-successful-event 'pull_request' question #134

Open
Dilvan44 opened this issue Dec 5, 2023 · 0 comments
Open

last-successful-event 'pull_request' question #134

Dilvan44 opened this issue Dec 5, 2023 · 0 comments
Labels
discussion A question or discussion from the user

Comments

@Dilvan44
Copy link

Dilvan44 commented Dec 5, 2023

First of all I am really thankful for this action as it tremendously helped building the CI/CD pipeline for our monorepo.

I have a question regarding the last-successful-event input parameter:
If I got a job setup like this

name: Staging

on:
  push:
    branches:
      - staging

jobs:
  deploy:
    runs-on: ubuntu-latest
    # This is required to allow the deploy job to read the secrets and shas
    permissions:
      contents: 'read'
      actions: 'read'
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Derive appropriate SHAs for base and head for `nx affected` commands
        uses: nrwl/nx-set-shas@v4
        with:
          main-branch-name: 'staging'
          last-successful-event: 'pull_request'`
          

and then I merge a PR into staging, would that mean that NX_BASE and NX_HEAD are the same sha?

Because it would than find the just created merge push?

@mandarini mandarini added the discussion A question or discussion from the user label May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion A question or discussion from the user
Projects
None yet
Development

No branches or pull requests

2 participants