astronomer / deploy-action

Custom Github Actions
Other
20 stars 21 forks source link

Not able to deploy with v0.8.0 using either workflow dispatch nor a merged PR trigger #94

Open alexxsxnchez opened 1 week ago

alexxsxnchez commented 1 week ago

Using v0.8.0, we're seeing an issue where nothing actually gets deployed even though the GH action succeeds. From what I can tell, it looks like the SKIP_IMAGE_OR_DAGS_DEPLOY value is never set to false, so the deploy step is skipped. In the logs I see an empty files changed: line, even though there should be changes (sometimes normal DAG changes within the dags/ folder and other times non-dag changes).

We are triggering this action from a workflow dispatch call, usually just against the master branch. However, we have also triggered the action from a merged PR and I’m seeing the same issue. On the other hand, if the action is triggered from a pushed branch, then the deploy is successful (both DAG-only deploys, and full-image deploys).

The only parameters we're passing are the deployment-id and a description.

sakethsomaraju commented 1 week ago

Steps to reproduce:

  1. Create a new deployment in astro. Create API_TOKEN with deployment admin for the same deployment.
  2. create github secrets with deployment ID and deployment token with keys ASTRO_DEPLOYMENT_ID andASTRO_API_TOKEN respectively.
  3. create a new GitHub repository and clone it.
  4. Add the following workflow in .github/workflows/deploy.yml
    
    name: "[Manual Trigger] - Deploy to Production"

run-name: Deploy '${{ github.ref_name }}' to Prod

on: workflow_dispatch:

env: ASTRONOMER_SKIP_PARSE: true

concurrency: group: ${{ github.workflow }} # group at the workflow level

jobs: verify_valid_ref: runs-on: ubuntu-latest steps:



4. Perform `astro dev init` in the same repository.
5. Commit and push to the remote repository.
6. Trigger the workflow. 
![Image](https://github.com/user-attachments/assets/0ca3cd63-1a99-4f27-994f-7a0557fd019c)
The workflow succeeds, but the deployment is not updated. The workflow log shows `files changed: ` as blank, although files are updated.

# Expected behaviour

Workflow succeed with deployment update.