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
10 changes: 6 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ concurrency:

env:
ENVIRONMENT: production
PROJECT: cloud
APPLICATION: cloud
DECLARATIVE_OWNER: appwrite-labs
DECLARATIVE_REPOSITORY: cloud-applications
DECLARATIVE_REPOSITORY: application-configuration
DECLARATIVE_ALIAS: cloud-console
IMAGE_NAME: appwrite/console-cloud
TAG: ${{ github.event.release.tag_name || github.sha }}
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
# Shared across the staging and production workflows so their deploy
# jobs never push to cloud-applications at the same time.
# jobs never push to application-configuration at the same time.
concurrency:
group: declarative-deploy
cancel-in-progress: false
Expand All @@ -77,7 +79,7 @@ jobs:
persist-credentials: false

- name: Update image tag
run: yq -i '.[strenv(DECLARATIVE_ALIAS)].image.tag = strenv(TAG)' ${{ env.ENVIRONMENT }}/cloud/default.yaml
run: yq -i '.[strenv(DECLARATIVE_ALIAS)].image.tag = strenv(TAG)' ${{ env.PROJECT }}/${{ env.ENVIRONMENT }}/${{ env.APPLICATION }}/default.yaml

- name: Open pull request
# The release author reviews; falls back to the dispatcher for
Expand All @@ -90,7 +92,7 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ${{ env.ENVIRONMENT }}/cloud/default.yaml
git add ${{ env.PROJECT }}/${{ env.ENVIRONMENT }}/${{ env.APPLICATION }}/default.yaml
if git diff --cached --quiet; then
echo "No changes to commit"
exit 0
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ concurrency:

env:
ENVIRONMENT: staging
PROJECT: cloud
APPLICATION: cloud
DECLARATIVE_OWNER: appwrite-labs
DECLARATIVE_REPOSITORY: cloud-applications
DECLARATIVE_REPOSITORY: application-configuration
DECLARATIVE_ALIAS: cloud-console
IMAGE_NAME: appwrite/console-cloud-stage
TAG: ${{ github.sha }}
Expand Down Expand Up @@ -54,7 +56,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
# Shared across the staging and production workflows so their deploy
# jobs never push to cloud-applications at the same time.
# jobs never push to application-configuration at the same time.
concurrency:
group: declarative-deploy
cancel-in-progress: false
Expand All @@ -77,15 +79,15 @@ jobs:
persist-credentials: false

- name: Update image tag
run: yq -i '.[strenv(DECLARATIVE_ALIAS)].image.tag = strenv(TAG)' ${{ env.ENVIRONMENT }}/cloud/default.yaml
run: yq -i '.[strenv(DECLARATIVE_ALIAS)].image.tag = strenv(TAG)' ${{ env.PROJECT }}/${{ env.ENVIRONMENT }}/${{ env.APPLICATION }}/default.yaml

- name: Commit and push
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add ${{ env.ENVIRONMENT }}/cloud/default.yaml
git add ${{ env.PROJECT }}/${{ env.ENVIRONMENT }}/${{ env.APPLICATION }}/default.yaml
if git diff --cached --quiet; then
echo "No changes to commit"
else
Expand Down