diff --git a/.gitea/workflows/ci-main.yml b/.gitea/workflows/ci-main.yml index 4e93be7..b25f06f 100644 --- a/.gitea/workflows/ci-main.yml +++ b/.gitea/workflows/ci-main.yml @@ -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: |