mirror of
https://github.com/vernette/ipregion.git
synced 2026-04-28 03:19:29 +00:00
ci(workflow): add workflow to build and push image
This commit is contained in:
parent
4eb2d89362
commit
6c37348dcf
1 changed files with 33 additions and 0 deletions
33
.github/workflows/build-docker.yml
vendored
Normal file
33
.github/workflows/build-docker.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue