2021-08-11 23:00:00 +02:00
|
|
|
name: build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-08-11 23:23:09 +02:00
|
|
|
paths:
|
|
|
|
- 'geoip2influx.py'
|
|
|
|
- 'requirements.txt'
|
2021-08-11 23:24:17 +02:00
|
|
|
- 'Dockerfile'
|
2021-08-11 23:23:09 +02:00
|
|
|
- 'root/**'
|
2021-08-11 23:00:00 +02:00
|
|
|
jobs:
|
|
|
|
push_to_ghcr_io:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.repository_owner }}
|
|
|
|
password: ${{ secrets.GH_PAT }}
|
|
|
|
- name: build&push
|
|
|
|
run: |
|
2021-08-11 23:12:51 +02:00
|
|
|
docker build . --tag ghcr.io/gilbn/geoip2influx
|
2021-08-11 23:00:00 +02:00
|
|
|
docker push ghcr.io/gilbn/geoip2influx
|
|
|
|
push_to_dockerhub:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DH_USER }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: build&push
|
|
|
|
run: |
|
2021-08-11 23:12:51 +02:00
|
|
|
docker build . --tag gilbn/geoip2influx
|
2021-08-11 23:00:00 +02:00
|
|
|
docker push gilbn/geoip2influx
|