-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9746c23
commit 033f689
Showing
5 changed files
with
113 additions
and
0 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,21 @@ | ||
name: bundle-exec-rspec | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
# - name: Create .env file | ||
# run: cat .env-example .env-dev-values > .env | ||
# - name: Load .env file | ||
# uses: xom9ikk/dotenv@v1.0.2 | ||
- name: Set up Ruby 2.6.6 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6.6 | ||
bundler-cache: true | ||
- name: Run tests | ||
run: bundle exec rubocop |
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,32 @@ | ||
name: deploy-branch-to-testing | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
environment: fulcrum-testing | ||
steps: | ||
- name: GITHUB_SHA | ||
run: echo "$GITHUB_SHA" | ||
- name: GITHUB_REF | ||
run: echo "$GITHUB_REF" | ||
- name: SECRETS | ||
env: | ||
SECRETS: ${{ toJson(secrets) }} | ||
run: echo "$SECRETS" | ||
- name: Setup Kubectl | ||
uses: azure/setup-kubectl@v1 | ||
- name: Authenticate with kubernetes | ||
run: | | ||
mkdir -p ${HOME}/.kube/certs/cluster | ||
echo ${{ secrets.CA_CRT_BASE64 }} | base64 -d > ${HOME}/.kube/certs/cluster/k8s-ca.crt | ||
kubectl config set-cluster cluster --certificate-authority=${HOME}/.kube/certs/cluster/k8s-ca.crt --server=`echo ${{ secrets.SERVER_URL_BASE64 }} | base64 -d` | ||
kubectl config set-credentials default --token=`echo ${{ secrets.TOKEN_BASE64 }} | base64 -d` | ||
kubectl config set-context default --cluster=cluster --user=default --namespace=`echo ${{ secrets.NAMESPACE_BASE64 }} | base64 -d` | ||
kubectl config use-context default | ||
- name: Deploy | ||
run: | | ||
kubectl config view | ||
kubectl config current-context | ||
# kubectl set image deployment web web=docker.pkg.github.com/mlibrary/patron_account/patron_account:${{ steps.tag_check.outputs.tag }} |
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,36 @@ | ||
name: echo-env-context-to-json | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
echo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: GITHUB_SHA | ||
run: echo "GITHUB_SHA $GITHUB_SHA" | ||
- name: GITHUB_REF | ||
run: echo "GITHUB_REF $GITHUB_REF" | ||
- name: Dump GitHub context | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: Dump job context | ||
env: | ||
JOB_CONTEXT: ${{ toJson(job) }} | ||
run: echo "$JOB_CONTEXT" | ||
- name: Dump steps context | ||
env: | ||
STEPS_CONTEXT: ${{ toJson(steps) }} | ||
run: echo "$STEPS_CONTEXT" | ||
- name: Dump runner context | ||
env: | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
run: echo "$RUNNER_CONTEXT" | ||
- name: Dump strategy context | ||
env: | ||
STRATEGY_CONTEXT: ${{ toJson(strategy) }} | ||
run: echo "$STRATEGY_CONTEXT" | ||
- name: Dump matrix context | ||
env: | ||
MATRIX_CONTEXT: ${{ toJson(matrix) }} | ||
run: echo "$MATRIX_CONTEXT" |
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,21 @@ | ||
name: package-branch-image | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
name: Checkout | ||
- uses: craftech-io/package-action@v3.1.0 | ||
name: Package | ||
id: url-GPR | ||
with: | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
image_name: fulcimen | ||
tags: | | ||
latest | ||
${{ github.sha }} | ||
- name: imageURL | ||
run: echo ${{ steps.url-GPR.outputs.imageURL }} |
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