Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 6m48s
49 lines
2.0 KiB
YAML
Executable File
49 lines
2.0 KiB
YAML
Executable File
name: Gitea Actions Demo
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
on: [push]
|
|
|
|
jobs:
|
|
Explore-Gitea-Actions:
|
|
runs-on: tsd_test
|
|
steps:
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v4
|
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
|
- name: Extract Docker metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
# Hardcode your registry URL and use the repository variable
|
|
# The variable gitea.repository already contains 't8dev/python-srv-cicd-test'
|
|
images: gitea.caddy.book-online.ru/${{ gitea.repository }}
|
|
|
|
- name: Log in to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: 'gitea.caddy.book-online.ru'
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.CICD_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=registry,ref=gitea.caddy.book-online.ru/${{ gitea.repository }}:buildcache
|
|
cache-to: type=registry,ref=gitea.caddy.book-online.ru/${{ gitea.repository }}:buildcache,mode=max,image-manifest=true,oci-mediatypes=true,compression=gzip,force-compression=true
|
|
|
|
|
|
- name: List files in the repository
|
|
run: |
|
|
ls ${{ gitea.workspace }}
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
- name: build
|
|
run: docker-compose up -d
|