27 lines
743 B
YAML
27 lines
743 B
YAML
name: 'build-and-push'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build:
|
|
runs-on: cth-ubuntu-latest
|
|
needs: build
|
|
if: gitea.ref == 'refs/heads/main'
|
|
steps:
|
|
- uses: https://github.com/actions/checkout@v4
|
|
- uses: https://github.com/docker/setup-buildx-action@v3
|
|
with:
|
|
config-inline: |
|
|
[registry."192.168.0.151:32000"]
|
|
http = true
|
|
insecure = true
|
|
- name: Build and push Docker image
|
|
uses: https://github.com/docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: "192.168.0.151:32000/crawler:${{gitea.sha}},192.168.0.151:32000/crawler:latest"
|