-
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.
PDA-325 Create common GHA for PDA services (#118)
* reorganizing deploy and cache for eks * added steps * Changed to using go mod for go build and go setup * Missed saving file * Updated sonarscanner setup and passed the repo token down to setup go * Added github token to buf * Changed files around again * Fixed cache naming * Made caching optional * remove optional cache * fixed comment * Added tag update * Fixing name * ugh no autosave * Changed to v0 * Adjusting sudo command * updating to newer uterm code * Cleaned up dist * Added back dist or everything fails * changed name to ssh * Moving back to original action but removing sudo * Try again * Added sudo back in * fixing sudo * Continued refactor * remove tidy and use download * remove tidy and use download * rename setup * tab on copy/paste * Reverting all js changes * added back licenses
- Loading branch information
Showing
8 changed files
with
93 additions
and
56 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,30 @@ | ||
name: Update Main Version | ||
run-name: Move ${{ github.event.inputs.major_version }} to ${{ github.event.inputs.target }} | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
target: | ||
description: The tag or reference to use | ||
required: true | ||
major_version: | ||
type: choice | ||
description: The major version to update | ||
options: | ||
- v0 | ||
|
||
jobs: | ||
tag: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Git config | ||
run: | | ||
git config user.name flipp-bot | ||
git config user.email [email protected] | ||
- name: Tag new target | ||
run: git tag -f ${{ github.event.inputs.major_version }} ${{ github.event.inputs.target }} | ||
- name: Push new tag | ||
run: git push origin ${{ github.event.inputs.major_version }} --force |
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: 'cache' | ||
description: 'Custom GitHub action that caches the workspace code to the default location for deploy' | ||
|
||
inputs: | ||
DEPLOY_CACHE_PATH: | ||
description: Path to restore cache | ||
required: false | ||
default: ./* | ||
DEPLOY_CACHE_KEY: | ||
description: Cache key | ||
required: false | ||
default: workspace-cache-${{ github.run_id }} | ||
|
||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ inputs.DEPLOY_CACHE_PATH }} | ||
key: ${{ inputs.DEPLOY_CACHE_KEY }} |
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 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,23 @@ | ||
name: 'lambda-deploy' | ||
description: 'Custom GitHub action that deploys the repository to lambda using its "/deploy/build.sh" script' | ||
|
||
inputs: | ||
ENV: | ||
description: Application environment (staging or production) | ||
required: true | ||
|
||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cleaning workspace | ||
shell: bash | ||
run: shopt -s dotglob && rm -rf "${{ github.workspace }}"/* | ||
- name: Restoring workspace from cache | ||
uses: wishabi/github-actions/cache@v0 | ||
- name: Deploying to Lambda | ||
shell: bash | ||
run: | | ||
export DEPLOY_ENV=${{ inputs.ENV }} | ||
chmod +x ./deploy/build.sh && ./deploy/build.sh service |
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 |
---|---|---|
@@ -1,10 +1,7 @@ | ||
name: 'go-setup' | ||
name: 'go-configure' | ||
description: 'Set up Go environment for CI build. Sets up Buf if the relevant inputs are provided.' | ||
|
||
inputs: | ||
GO_VERSION: | ||
description: Golang version to be used for CI build | ||
required: true | ||
FLIPPCIRCLECIPULLER_REPO_TOKEN: | ||
description: Flipp circleci repo token | ||
required: true | ||
|
@@ -18,18 +15,15 @@ inputs: | |
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Setting up private modules access | ||
shell: bash | ||
run: git config --global url."https://${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }}:[email protected]/wishabi".insteadOf "https://github.com/wishabi" | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ inputs.GO_VERSION }} | ||
check-latest: true | ||
cache: true | ||
- name: Setting up buf | ||
uses: bufbuild/buf-setup-action@v1 | ||
if: "${{ inputs.BUF_BUILD_API_TOKEN != '' }}" | ||
with: | ||
github_token: ${{ inputs.FLIPPCIRCLECIPULLER_REPO_TOKEN }} | ||
buf_user: ${{ inputs.BUF_BUILD_USER }} | ||
buf_api_token: ${{ inputs.BUF_BUILD_API_TOKEN }} |
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 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