Skip to content

Commit

Permalink
ops: default tag better
Browse files Browse the repository at this point in the history
  • Loading branch information
arthyn committed Feb 9, 2024
1 parent b21a4a6 commit 92e2d0e
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 8 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/deploy-canary-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ on:
branches:
- 'staging'
jobs:
setup:
runs-on: ubuntu-latest
name: 'Setup Variable'
steps:
- name: Set default value
id: tag
run: |
TAG=${{ github.event.inputs.tag }}
echo "value=${TAG:-"staging"}" >> "$GITHUB_OUTPUT"
build-frontend:
runs-on: ubuntu-latest
name: 'Build Frontend'
needs: setup
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ steps.tag.outputs.value }}
- uses: actions/setup-node@v3
with:
node-version-file: ./ui/.nvmrc
Expand All @@ -36,7 +46,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ steps.tag.outputs.value }}
- uses: actions/download-artifact@v3
with:
name: 'ui-dist'
Expand All @@ -58,7 +68,7 @@ jobs:
git config --global user.email [email protected]
git add desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ github.event.inputs.tag }}
INPUT=${{ steps.tag.outputs.value }}
BRANCH=${INPUT:-"staging"}
git pull origin $BRANCH --rebase --autostash
git push
Expand All @@ -76,7 +86,7 @@ jobs:
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/landscape-apps groups binnec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ github.event.inputs.tag }}
./.github/helpers/deploy.sh tloncorp/landscape-apps groups binnec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ steps.tag.outputs.value }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/deploy-groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ on:
branches:
- 'develop'
jobs:
setup:
runs-on: ubuntu-latest
name: 'Setup Variable'
steps:
- name: Set default value
id: tag
run: |
TAG=${{ github.event.inputs.tag }}
echo "value=${TAG:-"staging"}" >> "$GITHUB_OUTPUT"
build-frontend:
runs-on: ubuntu-latest
name: 'Build Frontend'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ steps.tag.outputs.value }}
- uses: actions/setup-node@v3
with:
node-version-file: ./ui/.nvmrc
Expand All @@ -36,7 +45,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}
ref: ${{ steps.tag.outputs.value }}
- uses: actions/download-artifact@v3
with:
name: 'ui-dist'
Expand All @@ -58,7 +67,7 @@ jobs:
git config --global user.email [email protected]
git add desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ github.event.inputs.tag }}
INPUT=${{ steps.tag.outputs.value }}
BRANCH=${INPUT:-"develop"}
git pull origin $BRANCH --rebase --autostash
git push
Expand All @@ -79,7 +88,7 @@ jobs:
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/landscape-apps groups wannec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ github.event.inputs.tag }}
./.github/helpers/deploy.sh tloncorp/landscape-apps groups wannec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ steps.tag.outputs.value }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
Expand Down

0 comments on commit 92e2d0e

Please sign in to comment.