39 lines
1 KiB
YAML
39 lines
1 KiB
YAML
name: build
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
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: |
|
|
docker build . --tag ghcr.io/gilbn/geoip2influx
|
|
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: |
|
|
docker build . --tag gilbn/geoip2influx
|
|
docker push gilbn/geoip2influx
|