mirror of https://github.com/kortix-ai/suna.git
updated gh actions test
This commit is contained in:
parent
9c5e73ef80
commit
028b447c25
|
@ -6,6 +6,8 @@ on:
|
||||||
- main
|
- main
|
||||||
- PRODUCTION
|
- PRODUCTION
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
repository_dispatch:
|
||||||
|
types: [production-updated]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
@ -16,11 +18,21 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event_name == 'repository_dispatch' && 'PRODUCTION' || github.ref }}
|
||||||
|
|
||||||
- name: Get tag name
|
- name: Get tag name
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [[ "${GITHUB_REF#refs/heads/}" == "main" ]]; then
|
echo "Event name: ${{ github.event_name }}"
|
||||||
|
echo "Current ref: ${{ github.ref }}"
|
||||||
|
echo "Branch: ${GITHUB_REF#refs/heads/}"
|
||||||
|
|
||||||
|
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
|
||||||
|
echo "Triggered by repository dispatch - setting prod environment"
|
||||||
|
echo "branch=prod" >> $GITHUB_OUTPUT
|
||||||
|
echo "environment=prod" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${GITHUB_REF#refs/heads/}" == "main" ]]; then
|
||||||
echo "branch=latest" >> $GITHUB_OUTPUT
|
echo "branch=latest" >> $GITHUB_OUTPUT
|
||||||
echo "environment=staging" >> $GITHUB_OUTPUT
|
echo "environment=staging" >> $GITHUB_OUTPUT
|
||||||
elif [[ "${GITHUB_REF#refs/heads/}" == "PRODUCTION" ]]; then
|
elif [[ "${GITHUB_REF#refs/heads/}" == "PRODUCTION" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue