Skip to content

Commit

Permalink
create switch traffic workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lnart committed Apr 22, 2024
1 parent becdf44 commit 7c5cbcc
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/switch-traffic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Switch traffic

on:
workflow_dispatch:

jobs:
update-ingress:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update Ingress File
run: |
sed -i '' \
-e 's/name: blue-service/name: TEMP-SERVICE/' \
-e 's/name: green-service/name: blue-service/' \
-e 's/name: TEMP-SERVICE/name: green-service/' \
-e 's/name: blue-api/name: TEMP-API/' \
-e 's/name: green-api/name: blue-api/' \
-e 's/name: TEMP-API/name: green-api/' ingress.yml
- name: Commit and push changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "Github Action"
git add ingress.yml
git commit -m "Update ingress service"

0 comments on commit 7c5cbcc

Please sign in to comment.