Update build.yaml to upload Docker image to soaska.ru
All checks were successful
Actions Build Docker Image / Explore-Gitea-Actions (push) Successful in 1m54s

This commit is contained in:
Alex Borisov 2024-01-29 20:37:59 +03:00
parent 1e4d1e5143
commit eff33da4e8

View File

@ -27,9 +27,11 @@ jobs:
docker build -t sd_telegram . docker build -t sd_telegram .
- name: Export Docker image to tar.gz - name: Export Docker image to tar.gz
run: | run: |
docker save sd_telegram | gzip > sd_telegram.tar.gz ${{ secrets.gitea_upload_url }} docker save sd_telegram | gzip > sd_telegram.tar.gz
- name: Upload Docker image to Gitea - name: Add new variables
run: | run: |
package_name=$(basename ${{ github.repository }}) package_name=$(basename ${{ github.repository }})
commit_date=$(git log -1 --format=%cd --date=format:'%Y%m%d%H%M%S') commit_date=$(git log -1 --format=%cd --date=format:'%Y%m%d%H%M%S')
curl -u ${{ secrets.username }}:${{ secrets.password }} -X POST -F "file=@sd_telegram.tar.gz" https://soaska.ru/packages/${{ package_name }}/versions/${{ commit_date }} - name: Upload Docker image to soaska.ru
run: |
curl -u ${{ secrets.username }}:${{ secrets.password }} -X POST -F "file=@sd_telegram.tar.gz" https://soaska.ru/packages/${{ package_name }}/versions/${{ commit_date }}/sd_telegram.tar.gz