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

Update action.yaml #58

Merged
merged 2 commits into from
Apr 2, 2024
Merged
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
12 changes: 10 additions & 2 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ inputs:
`description: "Deployed from commit ..."` with the value of `github.event.after`.
This would display e.g. "Deployed from commit da39a3ee5e6b4b0d3255bfef95601890afd80709".
Reference: https://docs.github.com/en/webhooks/webhook-events-and-payloads#push.
deploy-image:
required: false
default: false
description: "If true image and DAGs will deploy"
outputs:
preview-id:
description: "The ID of the created deployment preview. Only works when action=create-deployment-preview"
Expand All @@ -88,7 +92,7 @@ runs:
if: ${{ inputs.checkout }} == true
with:
fetch-depth: 0 # Fetch all history
ref: ${{ github.event.after }}
ref: ${{ github.event.after }}
clean: false
# Determine if only DAGs have changes
- name: Install Astro CLI
Expand Down Expand Up @@ -265,7 +269,6 @@ runs:
- name: Get Deployment Type
run: |
cd ${{ inputs.root-folder }}

branch=$(echo "${GITHUB_REF#refs/heads/}")
echo "Branch pushed to: $branch"
git fetch origin $branch
Expand All @@ -290,6 +293,11 @@ runs:
dags_only=2
fi

if [[ ${{ inputs.deploy-image }} == true ]]; then
# make sure image and DAGs deploys because deploy-image is true
dags_only=0
fi

echo "DAGS_ONLY=$dags_only" >> $GITHUB_OUTPUT
shell: bash
id: deployment-type
Expand Down