Update .gitea/workflows/build.yml
This commit is contained in:
@@ -1,18 +1,22 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [master]
|
||||||
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: docker/login-action@v3
|
|
||||||
with:
|
- name: Login
|
||||||
registry: 192.168.31.100:3847
|
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login 192.168.31.100:3847 -u ${{
|
||||||
username: ${{ gitea.actor }}
|
secrets.REGISTRY_USER }} --password-stdin
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
- uses: docker/build-push-action@v5
|
- name: Build and push
|
||||||
with:
|
run: |
|
||||||
push: true
|
docker build -t 192.168.31.100:3847/arrelin/docker-exporter:latest .
|
||||||
tags: 192.168.31.100:3847/${{ gitea.repository }}:latest
|
docker push 192.168.31.100:3847/arrelin/docker-exporter:latest
|
||||||
|
|
||||||
|
- name: Logout
|
||||||
|
run: docker logout 192.168.31.100:3847
|
||||||
Reference in New Issue
Block a user