fix: replace placeholders with actual values
This commit is contained in:
parent
e2b9dc0c2f
commit
d17c23ae10
@ -14,22 +14,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Login to Harbor
|
- name: Login to Harbor
|
||||||
run: |
|
run: |
|
||||||
echo '${{ secrets.HARBOR_TOKEN }}' | docker login YOUR_REGISTRY -u '${{ secrets.HARBOR_USERNAME }}' --password-stdin
|
echo '${{ secrets.HARBOR_TOKEN }}' | docker login harbor.mxhunt.in -u '${{ secrets.HARBOR_USERNAME }}' --password-stdin
|
||||||
|
|
||||||
- name: Build and Push Docker image
|
- name: Build and Push Docker image
|
||||||
run: |
|
run: |
|
||||||
IMAGE=YOUR_REGISTRY/${{ vars.HARBOR_PROJECT }}/phoenix:${{ gitea.sha }}
|
IMAGE=harbor.mxhunt.in/${{ vars.HARBOR_PROJECT }}/phoenix:${{ gitea.sha }}
|
||||||
docker build -t $IMAGE .
|
docker build -t $IMAGE .
|
||||||
docker push $IMAGE
|
docker push $IMAGE
|
||||||
docker tag $IMAGE YOUR_REGISTRY/${{ vars.HARBOR_PROJECT }}/phoenix:latest
|
docker tag $IMAGE harbor.mxhunt.in/${{ vars.HARBOR_PROJECT }}/phoenix:latest
|
||||||
docker push YOUR_REGISTRY/${{ vars.HARBOR_PROJECT }}/phoenix:latest
|
docker push harbor.mxhunt.in/${{ vars.HARBOR_PROJECT }}/phoenix:latest
|
||||||
echo "Pushed: $IMAGE"
|
echo "Pushed: $IMAGE"
|
||||||
|
|
||||||
- name: Update deployments repo
|
- name: Update deployments repo
|
||||||
run: |
|
run: |
|
||||||
git clone https://gitea-actions:${{ secrets.DEPLOY_TOKEN }}@YOUR_GITEA/${{ gitea.repository_owner }}/deployments.git
|
git clone https://gitea-actions:${{ secrets.DEPLOY_TOKEN }}@git.mxhunt.in/${{ gitea.repository_owner }}/deployments.git
|
||||||
cd deployments
|
cd deployments
|
||||||
sed -i "s|image: .*/phoenix:.*|image: YOUR_REGISTRY/${{ vars.HARBOR_PROJECT }}/phoenix:${{ gitea.sha }}|" phoenix/deployment.yaml
|
sed -i "s|image: .*/phoenix:.*|image: harbor.mxhunt.in/${{ vars.HARBOR_PROJECT }}/phoenix:${{ gitea.sha }}|" phoenix/deployment.yaml
|
||||||
git config user.name "gitea-actions"
|
git config user.name "gitea-actions"
|
||||||
git config user.email "gitea-actions@localhost"
|
git config user.email "gitea-actions@localhost"
|
||||||
git add phoenix/deployment.yaml
|
git add phoenix/deployment.yaml
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user