Update build.yaml with Docker image name and upload URL
All checks were successful
Actions Build Docker Image / Explore-Gitea-Actions (push) Successful in 2m8s

This commit is contained in:
Alex Borisov 2024-01-29 20:28:15 +03:00
parent 8288607aaa
commit a2e6c21146

View File

@ -13,6 +13,7 @@ jobs:
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Install Docker
run: |
apk add --no-cache docker
@ -23,14 +24,14 @@ jobs:
docker info
- name: Build Dockerfile
run: |
docker build -t sd_telegram .
docker build -t myimage .
- name: Export Docker image to tar.gz
run: |
docker save sd_telegram | gzip > sd_telegram.tar.gz
docker save myimage | gzip > myimage.tar.gz
- name: Upload Docker image to Gitea
run: |
- name: Upload Docker image to Gitea
run: |
package_name=$(basename ${{ github.repository }})
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 }}
curl -u ${{ secrets.username }}:${{ secrets.password }} -X POST -F "file=@myimage.tar.gz" ${{ secrets.gitea_upload_url }}/packages/${{ package_name }}/versions/${{ commit_date }}