ci(workflow): add workflow to build and push image

This commit is contained in:
Nikita Skryabin 2025-11-13 11:13:48 +03:00
parent 4eb2d89362
commit 6c37348dcf

33
.github/workflows/build-docker.yml vendored Normal file
View file

@ -0,0 +1,33 @@
name: Build and Push Docker Image
on:
push:
paths:
- "ipregion.sh"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/ipregion:latest
platforms: linux/amd64