29 lines
708 B
YAML
29 lines
708 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Docker CLI
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y docker.io
|
|
|
|
- name: Login to Gitea Container Registry
|
|
run: echo "${{ secrets.PKG_TOKEN }}" | docker login gitea.sinav-lab.com -u "${{ gitea.actor }}" --password-stdin
|
|
|
|
- name: Build Docker image
|
|
run: docker build -t gitea.sinav-lab.com/sinav/keenetic-exporter:latest .
|
|
|
|
- name: Push Docker image
|
|
run: docker push gitea.sinav-lab.com/sinav/keenetic-exporter:latest
|