feat: enhance build/push step in deploy workflow with version tagging
All checks were successful
/ build-push (push) Successful in 9m10s
All checks were successful
/ build-push (push) Successful in 9m10s
This commit is contained in:
@@ -1,14 +1,25 @@
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-push:
|
build-push:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Login Harbor
|
- name: Login Harbor
|
||||||
run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login 172.35.0.216 -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login 172.35.0.216 -u ${{ secrets.HARBOR_USERNAME }} --password-stdin
|
||||||
- name: Build/Push
|
|
||||||
|
- name: Build/Push with Tagging
|
||||||
run: |
|
run: |
|
||||||
docker build -t 172.35.0.216/library/vendaweb-portal:latest .
|
REPO="172.35.0.216/library/vendaweb-portal"
|
||||||
docker push 172.35.0.216/library/vendaweb-portal:latest
|
VERSION="v${{ gitea.run_number }}"
|
||||||
|
|
||||||
|
echo "Iniciando build da versão: $VERSION"
|
||||||
|
|
||||||
|
docker build -t $REPO:$VERSION -t $REPO:latest .
|
||||||
|
|
||||||
|
docker push $REPO:$VERSION
|
||||||
|
docker push $REPO:latest
|
||||||
|
|
||||||
- name: Webhook Portainer
|
- name: Webhook Portainer
|
||||||
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONT }}"
|
run: curl -X POST "${{ secrets.PORTAINER_WEBHOOK_FRONT }}"
|
||||||
Reference in New Issue
Block a user