Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new workflow file #3

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,26 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}"
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
aws-region: ap-southeast-2
# - name: Checkout
# uses: actions/checkout@v2
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}"
# aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
# aws-region: ap-southeast-2
- name: ci
uses: matt-tyler/aws-codebuild-run-build@master
uses: MechanicalRock/aws-codebuild-run-build@uat
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION: ap-southeast-2
GITHUB_SECRET: ${{ secrets.GITHUB_TOKEN }}
with:
project-name: DemoApp-Status-Check
endpoint: ${{ secrets.ENDPOINT }}
use-credentials: false
project-name: test-project
buildspec-override: ci/build.spec.yml


# test:
# runs-on: ubuntu-latest
# steps:
Expand Down
16 changes: 5 additions & 11 deletions ci/build.spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ phases:
runtime-versions:
nodejs: 12
commands:
- |
case "$CODEBUILD_INITIATOR" in
codepipeline*)
. ./github.env;;
*)
wget -O archive.tar.gz https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY/archive/$GITHUB_SHA.tar.gz
tar -xvf archive.tar.gz --strip 1
rm archive.tar.gz
esac
- npm ci
- cd $CNF_SRC_DIR
- ls -alh
# - npm ci
build:
commands:
- npm run build
- ls -alh
# - npm run build
artifacts:
files:
- "**/*"