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