forked from dexidp/dex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github actions for local ht shib proxy dex
- Loading branch information
Showing
7 changed files
with
94 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Docker Build master | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Clone latest repository | ||
uses: actions/checkout@v2 | ||
- name: Build dex container image and push to DockerHub | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: 'hathitrust/dex-shib-proxy-unstable:${{ github.sha }},hathitrust/dex-shib-proxy-unstable:latest' | ||
file: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Manual Deploy (Testing) | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azure/setup-kubectl@v1 | ||
- name: Authenticate with kubernetes | ||
run: | | ||
mkdir -p ${HOME}/.kube/certs/cluster | ||
echo ${{ secrets.KUBERNETES_CA }} | base64 -d > ${HOME}/.kube/certs/cluster/k8s-ca.crt | ||
kubectl config set-cluster cluster --certificate-authority=${HOME}/.kube/certs/cluster/k8s-ca.crt --server=https://macc.kubernetes.hathitrust.org | ||
kubectl config set-credentials github --token=${{ secrets.KUBERNETES_TOKEN }} | ||
kubectl config set-context github --cluster=cluster --user=github --namespace=oidc-saml-proxy-testing | ||
kubectl config use-context github | ||
- name: Manual Deploy (Testing) | ||
run: kubectl set image deployment oidc-saml-proxy oidc-saml-proxy=hathitrust/dex-shib-proxy-unstable:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Manual Deploy (Production) | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: azure/setup-kubectl@v1 | ||
- name: Authenticate with kubernetes | ||
run: | | ||
mkdir -p ${HOME}/.kube/certs/cluster | ||
echo ${{ secrets.KUBERNETES_CA }} | base64 -d > ${HOME}/.kube/certs/cluster/k8s-ca.crt | ||
kubectl config set-cluster cluster --certificate-authority=${HOME}/.kube/certs/cluster/k8s-ca.crt --server=https://macc.kubernetes.hathitrust.org | ||
kubectl config set-credentials github --token=${{ secrets.KUBERNETES_TOKEN }} | ||
kubectl config set-context github --cluster=cluster --user=github --namespace=oidc-saml-proxy-production | ||
kubectl config use-context github | ||
- name: Manual Deploy (Production) | ||
run: kubectl set image deployment oidc-saml-proxy oidc-saml-proxy=hathitrust/dex-shib-proxy:latest |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Docker Tag Latest Release | ||
|
||
on: | ||
release: | ||
types: [ released ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Clone latest repository | ||
uses: actions/checkout@v2 | ||
- name: Tag latest release in DockerHub | ||
run: | | ||
docker pull hathitrust/dex-shib-proxy-unstable:${{ github.sha }} | ||
docker tag hathitrust/dex-shib-proxy-unstable:${{ github.sha }} hathitrust/dex-shib-proxy:${{ github.event.release.tag_name }} | ||
docker tag hathitrust/dex-shib-proxy-unstable:${{ github.sha }} hathitrust/dex-shib-proxy:latest | ||
docker push hathitrust/dex-shib-proxy:${{ github.event.release.tag_name }} | ||
docker push hathitrust/dex-shib-proxy:latest |