From e5277a12d95f5d8c89d3b2f41317a2a9345cf822 Mon Sep 17 00:00:00 2001 From: GilbN <24592972+GilbN@users.noreply.github.com> Date: Wed, 11 Aug 2021 23:00:00 +0200 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a44e5ce --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +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 + 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 + docker push gilbn/geoip2influx