Actualiser .gitea/workflows/ci-main.yml
This commit is contained in:
parent
2d63487737
commit
474c9bea6e
@ -1,24 +1,26 @@
|
||||
name: BuildAndPushImageOnHarborAndUpdateArgoCDConfig
|
||||
name: Build And Push Image On Harbor And Update
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
branches: [ "develop" ]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: docker/login-action@v1
|
||||
with:
|
||||
registry: harbor.example.com
|
||||
registry: registry.tips-of-mine.com
|
||||
username: ${{ secrets.HARBOR_USERNAME }}
|
||||
password: ${{ secrets.HARBOR_PASSWORD }}
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
- name: BuildAndPushImageOnHarbor
|
||||
run: |
|
||||
docker build ./ -t harbor.example.com/chaturmail/chaturmail-backend:${{ github.run_number }}
|
||||
docker push harbor.example.com/chaturmail/chaturmail-backend:${{ github.run_number }}
|
||||
docker build ./ -t registry.tips-of-mine.com/chaturmail/chaturmail-backend:${{ github.run_number }}
|
||||
docker push registry.tips-of-mine.com/chaturmail/chaturmail-backend:${{ github.run_number }}
|
||||
|
||||
- name: Clone Repository
|
||||
run: |
|
||||
@ -29,7 +31,7 @@ jobs:
|
||||
sudo chmod a+x /usr/local/bin/yq
|
||||
- name: Update YAML File
|
||||
run: |
|
||||
yq -i '.spec.template.spec.containers[0].image = "harbor.example.com/chaturmail/chaturmail-backend:${{ github.run_number }}"' 'argocd-configs/chaturmail-pod.yaml'
|
||||
yq -i '.spec.template.spec.containers[0].image = "registry.tips-of-mine.com/chaturmail/chaturmail-backend:${{ github.run_number }}"' 'argocd-configs/chaturmail-pod.yaml'
|
||||
|
||||
- name: Push to Repo
|
||||
run: |
|
||||
|
Loading…
x
Reference in New Issue
Block a user