You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case for the turnstyle action where I would like it to be "intelligent" enough to listen for a specific job/step in a workflow to complete, rather than relying on the entire run to complete.
I have a proof of concept PR that I'm working on that I will link. The goal here is to take what is currently 2 workflows and combine them into a single workflow with two jobs, the first job is "turnstyled" and performs a git checkout and a gitops commit before pushing back to main. The second part of the job then will trigger a deployment job that might take 1-2 minutes depending on migrations and such.
We would like the run turnstyle, to only consider the first job (or a particular step) as the trigger to gate the action.
Example abbreviated workflow (we also might want to combine the jobs into a single job [thus wanting two new inputs]:
jobs:
create-deployment-commit:
runs-on: ubuntu-lateststeps:
# Use the turnstyle action to ensure that the checkout and commit steps are run and committed before another job# is allowed to run.
- name: Turnstyleuses: softprops/turnstyle@v2with:
# Shortening the poll interval to 10 seconds to ensure that the commit is picked up quickly (default is 60s)poll-interval-seconds: 10job-to-wait-for: "create-deployment-commit"
- uses: actions/checkout@v4
- name: Create GitOps Deployment Commitid: create-deployment-commitrun: > ./scripts/deployment/createDeploymentCommit.sh -e ${{ inputs.environment }} -n ${{ inputs.serviceName }} -t ${{ inputs.imageTag }} ${{ inputs.verbose && '-v' || '' }} ${{ inputs.dryRun && '-d' || '' }}sync-argocd-dev:
runs-on: ubuntu-lateststeps:
- name: Setup ArgoCD CLIuses: imajeetyadav/argocd-cli@v1with:
version: v2.13.0
- name: Dev Deployment for Service - ArgoCD Syncid: sync-argocdif: ${{ !inputs.dryRun }}env:
# Note: ArgoCD deployed applications are prefixed with their namespace, i.e. mono-<service-name>ARGOCD_APP_NAME: mono-${{ inputs.serviceName }}run: | # Refresh the app to ensure the latest changes are detected. argocd app get "${ARGOCD_APP_NAME}" --hard-refresh \ --argocd-context argocd.dev.company.com || exit 1 # Sync the app to apply the changes argocd app sync "${ARGOCD_APP_NAME}" --prune \ --timeout 300 \ --argocd-context argocd.dev.company.com
The text was updated successfully, but these errors were encountered:
Hi,
I have a use case for the turnstyle action where I would like it to be "intelligent" enough to listen for a specific job/step in a workflow to complete, rather than relying on the entire run to complete.
I have a proof of concept PR that I'm working on that I will link. The goal here is to take what is currently 2 workflows and combine them into a single workflow with two jobs, the first job is "turnstyled" and performs a git checkout and a gitops commit before pushing back to main. The second part of the job then will trigger a deployment job that might take 1-2 minutes depending on migrations and such.
We would like the run turnstyle, to only consider the first job (or a particular step) as the trigger to gate the action.
Example abbreviated workflow (we also might want to combine the jobs into a single job [thus wanting two new inputs]:
The text was updated successfully, but these errors were encountered: