ci(#3): 🔒 Added registry login
This commit is contained in:
parent
ddbf2e01eb
commit
721cc90331
1 changed files with 9 additions and 8 deletions
|
@ -19,14 +19,15 @@ jobs:
|
|||
docker build -t loic:${{ github.sha }} .
|
||||
echo "$FORGEJO_API_TOKEN" | docker login -u {{ .Identity }} --password-stdin ${{ env.FORGEJO_BASE_URL }}
|
||||
docker tag loic:${{ github.sha }} ${{ env.FORGEJO_BASE_URL }}/{{ .Identity }}/loic:${{ github.sha }}
|
||||
docker login -u {{ .Identity }} --password-stdin ${{ secret.PASSWORD }}
|
||||
docker push ${{ env.FORGEJO_BASE_URL }}/{{ .Identity }}/loic:${{ github.sha }}
|
||||
- name: Update Deployment Manifest
|
||||
run: |
|
||||
sed -i "s|image: .*|image: ${{ env.FORGEJO_BASE_URL }}/{{ .Identity }}/loic:${{ github.sha }}|" k8s/deployment.yaml
|
||||
git config --global user.email "ci@edp.local"
|
||||
git config --global user.name "CI Bot"
|
||||
git add k8s/deployment.yaml
|
||||
git commit -m "Update image to ${{ github.sha }}"
|
||||
git push
|
||||
# - name: Update Deployment Manifest
|
||||
# run: |
|
||||
# sed -i "s|image: .*|image: ${{ env.FORGEJO_BASE_URL }}/{{ .Identity }}/loic:${{ github.sha }}|" k8s/deployment.yaml
|
||||
# git config --global user.email "ci@edp.local"
|
||||
# git config --global user.name "CI Bot"
|
||||
# git add k8s/deployment.yaml
|
||||
# git commit -m "Update image to ${{ github.sha }}"
|
||||
# git push
|
||||
env:
|
||||
FORGEJO_API_TOKEN: ${{ secrets.FORGEJO_API_TOKEN }}
|
||||
|
|
Loading…
Reference in a new issue