ci: use git.khalilaliouich.com for docker push
This commit is contained in:
@@ -40,28 +40,28 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to Gitea Container Registry
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.88.96.58.76.nip.io -u ${{ github.actor }} --password-stdin || echo "${{ secrets.GITHUB_TOKEN }}" | docker login gitea-http.gitea.svc.cluster.local:3000 -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.khalilaliouich.com -u ${{ github.actor }} --password-stdin || echo "${{ secrets.GITHUB_TOKEN }}" | docker login git.khalilaliouich.com -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Build and Push API
|
- name: Build and Push API
|
||||||
run: |
|
run: |
|
||||||
docker build --network=host -t git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} ./api
|
docker build --network=host -t git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} ./api
|
||||||
docker push git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} || (docker tag git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} gitea-http.gitea.svc.cluster.local:3000/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} && docker push gitea-http.gitea.svc.cluster.local:3000/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }})
|
docker push git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} || (docker tag git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }} && docker push git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }})
|
||||||
|
|
||||||
- name: Build and Push Frontend
|
- name: Build and Push Frontend
|
||||||
run: |
|
run: |
|
||||||
docker build --network=host -t git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} ./frontend
|
docker build --network=host -t git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} ./frontend
|
||||||
docker push git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} || (docker tag git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} gitea-http.gitea.svc.cluster.local:3000/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} && docker push gitea-http.gitea.svc.cluster.local:3000/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }})
|
docker push git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} || (docker tag git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }} && docker push git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }})
|
||||||
|
|
||||||
- name: Update Kubernetes Manifests
|
- name: Update Kubernetes Manifests
|
||||||
run: |
|
run: |
|
||||||
sed -i "s|image: .*tamagotchi-api:.*|image: git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }}|g" api-deployment.yaml
|
sed -i "s|image: .*tamagotchi-api:.*|image: git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-api:${{ github.sha }}|g" api-deployment.yaml
|
||||||
sed -i "s|image: .*tamagotchi-frontend:.*|image: git.88.96.58.76.nip.io/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }}|g" frontend-deployment.yaml
|
sed -i "s|image: .*tamagotchi-frontend:.*|image: git.khalilaliouich.com/${{ github.repository_owner }}/tamagotchi-frontend:${{ github.sha }}|g" frontend-deployment.yaml
|
||||||
|
|
||||||
- name: Commit and Push changes
|
- name: Commit and Push changes
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "gitea-actions[bot]"
|
git config --global user.name "gitea-actions[bot]"
|
||||||
git config --global user.email "gitea-actions@gitea.local"
|
git config --global user.email "gitea-actions@gitea.local"
|
||||||
git remote set-url origin http://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@gitea-http.gitea.svc.cluster.local:3000/${{ github.repository }}
|
git remote set-url origin http://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@git.khalilaliouich.com/${{ github.repository }}
|
||||||
git add api-deployment.yaml frontend-deployment.yaml
|
git add api-deployment.yaml frontend-deployment.yaml
|
||||||
git commit -m "chore: deploy version ${{ github.sha }} [skip ci]" || echo "No changes to commit"
|
git commit -m "chore: deploy version ${{ github.sha }} [skip ci]" || echo "No changes to commit"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|||||||
Reference in New Issue
Block a user