This repository has been archived by the owner on Jan 7, 2025. It is now read-only.
更新 README.md,添加 Cloudinary 设置步骤和 Docker 操作示例 #3
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
name: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
run: docker login -u ${{ secrets.PROJECT }}@${{ secrets.SWR_AK }} -p ${{ secrets.SWR_SK }} swr.eu-de.otc.t-systems.com | |
- name: Build and push pg image | |
run: | | |
docker build -t swr.eu-de.otc.t-systems.com/testtesttest/pgdb:latest -f Dockerfile.pg . | |
docker push swr.eu-de.otc.t-systems.com/testtesttest/pgdb:latest | |
- name: Build and push web image | |
run: | | |
docker build -t swr.eu-de.otc.t-systems.com/testtesttest/web:latest -f Dockerfile.web . | |
docker push swr.eu-de.otc.t-systems.com/testtesttest/web:latest | |
- name: Apply Kubernetes configuration | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.KUBECONFIG }} | |
with: | |
args: apply -f k8s.yaml |