This commit is contained in:
27
.gitea/workflows/tsd1.yaml
Normal file → Executable file
27
.gitea/workflows/tsd1.yaml
Normal file → Executable file
@@ -13,6 +13,33 @@ jobs:
|
||||
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 }}
|
||||
|
||||
Reference in New Issue
Block a user