diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..24cdda7 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "monthly" + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "monthly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0b18682 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: CI + +on: + pull_request: + push: + branches: + - master + +jobs: + test: + name: Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + - run: test -z $(go fmt) + - run: go build + - run: go vet + - run: go test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a33bb55 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + branches: + - master + +jobs: + release: + name: Docker + runs-on: ubuntu-latest + steps: + - uses: docker/setup-buildx-action@v1 + - uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.CR_PAT }} + - uses: docker/build-push-action@v2 + with: + push: true + tags: | + pkoenig10/oidc-rp:latest + pkoenig10/oidc-rp:${{ github.sha }} + ghcr.io/pkoenig10/oidc-rp:latest + ghcr.io/pkoenig10/oidc-rp:${{ github.sha }} diff --git a/README.md b/README.md index b4f514a..e6b4b85 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ -[hub]: https://hub.docker.com/r/pkoenig10/oidc-rp - # oidc-rp -[![Docker Build Status](https://img.shields.io/docker/cloud/build/pkoenig10/oidc-rp.svg)][hub] [![Docker Automated Build](https://img.shields.io/docker/cloud/automated/pkoenig10/oidc-rp.svg)][hub] [![Docker Pulls](https://img.shields.io/docker/pulls/pkoenig10/oidc-rp.svg)][hub] [![Docker Stars](https://img.shields.io/docker/stars/pkoenig10/oidc-rp.svg)][hub] +[![](https://img.shields.io/github/workflow/status/pkoenig10/oidc-rp/CI?label=ci)][actions] +[![](https://img.shields.io/github/workflow/status/pkoenig10/oidc-rp/Release?label=release)][actions] An [OpenID Connect](https://openid.net/connect/) Relying Party server that can be used with the [NGINX](https://www.nginx.com/) [auth_request module](http://nginx.org/en/docs/http/ngx_http_auth_request_module.html). @@ -84,3 +83,5 @@ group2: - user1@example.com - user2@example.com ``` + +[actions]: https://github.com/pkoenig10/oidc-rp/actions diff --git a/hooks/post_push b/hooks/post_push deleted file mode 100644 index 0fd07be..0000000 --- a/hooks/post_push +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -docker tag $IMAGE_NAME $DOCKER_REPO:$SOURCE_COMMIT -docker push $DOCKER_REPO:$SOURCE_COMMIT