actions-add
Some checks failed
Actions Build Docker Image / Explore-Gitea-Actions (push) Failing after 7s

This commit is contained in:
Alex Borisov 2024-01-29 19:35:18 +03:00
parent 592e58766b
commit 8f54f08afb

View File

@ -0,0 +1,34 @@
name: Actions Build Docker Image
run-name: ${{ gitea.actor }} is building new image 🚀
on: [push]
jobs:
Explore-Gitea-Actions:
runs-on: soaska
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: apk add --no-cache nodejs
- name: Check out repository code
uses: actions/checkout@v3
- 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
service docker start
docker info
- name: Build Dockerfile
run: |
docker build -t myimage .
- name: Export Docker image to tar.gz
run: |
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=@myimage.tar.gz" ${{ secrets.gitea_upload_url }}/packages/${{ package_name }}/versions/${{ commit_date }}