Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ jobs:
mv e2e-setup/mocks/image-deploy-git.sh /usr/local/bin/git
fi
chmod +x /usr/local/bin/git
cp /usr/local/bin/astro /usr/local/bin/astro-original
mv e2e-setup/mocks/astro-deploy.sh /usr/local/bin/astro
chmod +x /usr/local/bin/astro
cp $HOME/.local/bin/astro $HOME/.local/bin/astro-original
mv e2e-setup/mocks/astro-deploy.sh $HOME/.local/bin/astro
chmod +x $HOME/.local/bin/astro

- name: Set CLI context
run: astro context switch ${{ steps.get-astro-env-info.outputs.astronomer_host }}
Expand Down Expand Up @@ -451,6 +451,7 @@ jobs:
runs-on: ubuntu-latest
needs: [infer-deploy, create-test-deployments]
strategy:
max-parallel: 1
matrix:
deployment_id:
[
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To use this GitHub action, you need:

To use this action, read [Automate code deploys with CI/CD](https://docs.astronomer.io/astro/ci-cd?tab=multiple%20branch#github-actions-dag-based-deploy). You will:

1. Create a GitHub Actions workflow in your repository that uses the latest version of this action. For example, `astronomer/deploy-action@v0.11.1`.
1. Create a GitHub Actions workflow in your repository that uses the latest version of this action. For example, `astronomer/deploy-action@v0.12.0`.
2. Configure the workflow to fit your team's use case. This could include creating a deployment preview or adding tests. See [Configuration options](https://github.com/astronomer/deploy-action#configuration-options).
3. Make changes to your Astro project files in GitHub and let this GitHub Actions workflow take care of deploying your code to Astro.

Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
parse: true
Expand All @@ -138,7 +138,7 @@ In the following example, the folder `/example-dags/` is specified as the root f
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
root-folder: /example-dags/
Expand All @@ -151,7 +151,7 @@ In the following example, the pytest located at `/tests/test-tags.py` runs befor
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
pytest: true
Expand All @@ -165,7 +165,7 @@ In the following example, `force` is enabled and both the DAG parse and pytest p
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
force: true
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
build-args: |
<your-build-arguments>
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
deploy-type: image-and-dags
Expand All @@ -223,7 +223,7 @@ In the following example we would be deploying the dbt project located at `dbt`
```yaml
steps:
- name: DBT Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
deploy-type: dbt
Expand All @@ -237,13 +237,13 @@ In the following example we would setup a workflow to deploy dags/images located
```yaml
steps:
- name: DBT Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
deploy-type: dbt
root-folder: dbt
- name: DAGs/Image Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
root-folder: astro-project/
Expand All @@ -257,7 +257,7 @@ In the following example, the deployment is woken up from hibernation before dep
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <deployment id>
wake-on-deploy: true
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create Deployment Preview
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
action: create-deployment-preview
deployment-id: <original deployment id>
Expand All @@ -319,7 +319,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Deployment Preview
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
action: deploy-deployment-preview
deployment-id: <original deployment id>
Expand All @@ -344,7 +344,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Deployment Preview
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
action: deploy-deployment-preview
deploy-type: dbt
Expand All @@ -371,7 +371,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Delete Deployment Preview
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
action: delete-deployment-preview
deployment-id: <original deployment id>
Expand All @@ -396,7 +396,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.11.1
uses: astronomer/deploy-action@v0.12.0
with:
deployment-id: <original deployment id>
```
6 changes: 3 additions & 3 deletions e2e-setup/mocks/astro-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# pre-req for this mock script would be to have the actual astro cli installed at /usr/local/bin/astro-original
# pre-req for this mock script would be to have the actual astro cli installed at $HOME/.local/bin/astro-original

if [ "$1" = "deploy" ]; then
# Change directory to 'e2e-setup/astro-project' and then call original `astro deploy`
# so that we could simulate the default behavior without needing to have the astro project in base folder
echo "cd into astro project" && cd e2e-setup/astro-project && /usr/local/bin/astro-original "$@"
echo "cd into astro project" && cd e2e-setup/astro-project && $HOME/.local/bin/astro-original "$@"
else
# If it's not a `deploy` command, run the original `astro`
/usr/local/bin/astro-original "$@"
$HOME/.local/bin/astro-original "$@"
fi