Files
bpi-stock-price-scraper/.gitea/workflows/on-push.yaml
T
Lino Silva 7841804cd1
Build and publish / build (push) Failing after 11s
fix: New approach
2026-04-10 17:35:59 +01:00

54 lines
1.5 KiB
YAML

name: Build and publish
run-name: Build docker image and publish to registry
on:
push:
branches:
- 'main'
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: https://github.com/actions/checkout@v4
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
with:
config-inline: |
[registry."10.0.2.28:222"]
http = true
- name: Log in to Gitea Container Registry
uses: https://github.com/docker/login-action@v3
with:
registry: 10.0.2.28:222
username: lino
password: ${{ secrets.REGISTRY_PASS }}
- name: Extract metadata
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
images: 10.0.2.28:222/${{ gitea.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
- name: Build and push Docker image
uses: https://github.com/docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max