actions-add
Some checks failed
Actions Build Docker Image / Explore-Gitea-Actions (push) Failing after 7s
Some checks failed
Actions Build Docker Image / Explore-Gitea-Actions (push) Failing after 7s
This commit is contained in:
parent
592e58766b
commit
8f54f08afb
34
.gitea/workflows/build.yaml
Normal file
34
.gitea/workflows/build.yaml
Normal 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 }}
|
Loading…
Reference in New Issue
Block a user