-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c411bf
commit 70f6805
Showing
5 changed files
with
197 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Deploy Service Drink | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Rust-test"] | ||
branches: [service-drink] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-push-and-deploy: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: service-drink | ||
|
||
- name: Build the Docker image | ||
run: docker compose build | ||
|
||
- name: Tag image | ||
run: docker tag drink:latest d3spina/t-web-800:drink-latest | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Push the Docker image | ||
run: docker push d3spina/t-web-800:drink-latest | ||
|
||
- name: Install kubectl | ||
run: | | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
chmod +x kubectl | ||
sudo mv kubectl /usr/local/bin/ | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save k8s-1-29-1-do-0-fra1-1711363150093 | ||
|
||
- name: Deploy to Kubernetes | ||
run: | | ||
kubectl set image deployment/drink drink=${{ secrets.DOCKER_USERNAME }}/t-web-800:drink-latest --namespace drink | ||
- name: Check deploy | ||
run: kubectl rollout status deployment/drink -n drink | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Deploy Service Eat | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Rust-test"] | ||
branches: [service-eat] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-push-and-deploy: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: service-eat | ||
|
||
- name: Build the Docker image | ||
run: docker compose build | ||
|
||
- name: Tag image | ||
run: docker tag eat:latest d3spina/t-web-800:eat-latest | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Push the Docker image | ||
run: docker push d3spina/t-web-800:eat-latest | ||
|
||
- name: Install kubectl | ||
run: | | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
chmod +x kubectl | ||
sudo mv kubectl /usr/local/bin/ | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save k8s-1-29-1-do-0-fra1-1711363150093 | ||
|
||
- name: Deploy to Kubernetes | ||
run: | | ||
kubectl set image deployment/eat eat=${{ secrets.DOCKER_USERNAME }}/t-web-800:eat-latest --namespace eat | ||
- name: Check deploy | ||
run: kubectl rollout status deployment/eat -n eat | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Deploy Service Sleep | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Rust-test"] | ||
branches: [service-sleep] | ||
types: | ||
- completed | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-push-and-deploy: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: service-sleep | ||
|
||
- name: Build the Docker image | ||
run: docker compose build | ||
|
||
- name: Tag image | ||
run: docker tag sleep:latest d3spina/t-web-800:sleep-latest | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Push the Docker image | ||
run: docker push d3spina/t-web-800:sleep-latest | ||
|
||
- name: Install kubectl | ||
run: | | ||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | ||
chmod +x kubectl | ||
sudo mv kubectl /usr/local/bin/ | ||
- name: Install doctl | ||
uses: digitalocean/action-doctl@v2 | ||
with: | ||
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} | ||
|
||
- name: Save DigitalOcean kubeconfig | ||
run: doctl kubernetes cluster kubeconfig save k8s-1-29-1-do-0-fra1-1711363150093 | ||
|
||
- name: Deploy to Kubernetes | ||
run: | | ||
kubectl set image deployment/sleep sleep=${{ secrets.DOCKER_USERNAME }}/t-web-800:sleep-latest --namespace sleep | ||
- name: Check deploy | ||
run: kubectl rollout status deployment/sleep -n sleep | ||
|