Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 9bca533

Browse files
committed
do it
2 parents a610269 + 026612b commit 9bca533

4 files changed

Lines changed: 172 additions & 48 deletions

File tree

Dockerfile

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,33 @@ LABEL com.github.actions.name="NodeJS Deploy AWS Serverless" \
2222
# Run the Update #
2323
##################
2424
RUN apk add --no-cache \
25+
<<<<<<< HEAD
2526
bash git musl-dev jq \
2627
nodejs npm gcc curl
28+
=======
29+
npm nodejs bash git musl-dev jq gcc curl
30+
>>>>>>> 026612bf3664fad8fba5d11311860d500187c42f
2731

2832
RUN pip install --upgrade --no-cache-dir \
2933
awscli aws-sam-cli
3034

35+
# Note: For now, we will use the builtin npm and nodejs
36+
# ##############################
37+
# # Install NVM for all NodeJS #
38+
# ##############################
39+
# ENV NVM_DIR /usr/local/nvm
40+
# ENV NODE_VERSION 10.16.3
41+
#
42+
# RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.20.0/install.sh | bash \
43+
# && . $NVM_DIR/nvm.sh \
44+
# && mkdir $NVM_DIR/versions \
45+
# && nvm install $NODE_VERSION \
46+
# && nvm alias default $NODE_VERSION \
47+
# && nvm use default
48+
#
49+
# ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
50+
# ENV PATH $NVM_DIR/v$NODE_VERSION/bin:$PATH
51+
3152
####################################
3253
# Setup AWS CLI Command Completion #
3354
####################################
@@ -38,8 +59,9 @@ RUN echo complete -C '/usr/local/bin/aws_completer' aws >> ~/.bashrc
3859
###########################################
3960
ENV GITHUB_SHA=${GITHUB_SHA}
4061
ENV GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH}
41-
ENV GITHUB_TOKEN=${GITHUB_TOKEN}
4262
ENV GITHUB_WORKSPACE=${GITHUB_WORKSPACE}
63+
ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY}
64+
ENV AWS_SECRET_ACCESS_KEY=${AWS_SECRET_KEY}
4365

4466
###########################
4567
# Copy files to container #

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# deploy-nodejs
22

33
This repository is for the **GitHub** Action to deploy a **NodeJS** application to **AWS** Serverless.
4-
Developers on **GitHub** can call this Action to take their current **NodeJS** application, and pass basic variables to help deploy
4+
Developers on **GitHub** can call this Action to take their current **NodeJS** application, and pass basic variables to help deploy thier application.
55

66
## How to use
77

@@ -26,7 +26,7 @@ This file should have the following code:
2626
## Deploy GitHub Actions ##
2727
###########################
2828
###########################
29-
name: Deploy Action
29+
name: NodeJS AWS SAM Deploy
3030

3131
#
3232
# Documentation:
@@ -44,9 +44,10 @@ on: ['push']
4444
jobs:
4545
build:
4646
# Name the Job
47-
name: Deploy NodeJS
47+
name: NodeJS AWS SAM Deploy
4848
# Set the agent to run on
4949
runs-on: ubuntu-latest
50+
5051
##################
5152
# Load all steps #
5253
##################
@@ -57,14 +58,23 @@ jobs:
5758
- name: Checkout Code
5859
uses: actions/checkout@master
5960

60-
##################
61-
# Run Deployment #
62-
##################
63-
- name: Run Deployment
64-
uses: github/deploy-nodejs@master
61+
#############################
62+
# Run NodeJS AWS SAM Deploy #
63+
#############################
64+
- name: NodeJS AWS SAM Deploy
65+
uses: docker://admiralawkbar/aws-nodejs:latest
66+
env:
67+
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
68+
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
6569
...
6670
```
6771

72+
**NOTE:** You will need to create the GitHub `Secrets` for:
73+
- **AWS_ACCESS_KEY**
74+
- Valid AWS Access key to authenticate to your AWS Account
75+
- **AWS_SECRET_KEY**
76+
- Valid AWS Access Secret key to authenticate to your AWS Account
77+
6878
## How to contribute
6979

7080
If you would like to help contribute to this **Github** Action, please see [CONTRIBUTING](https://github.com/github/deploy-nodejs/blob/master/.github/CONTRIBUTING.md)

TEMPLATE/aws-config.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ aws_stack_name: mystack
3535
# sam_template: .github/template.yml
3636
sam_template:
3737

38-
###########################################
39-
# aws_access_key_id for connection to AWS #
40-
###########################################
41-
# NOTE: this AWS key needs all access to build and deploy SAM
42-
aws_access_key_id:
43-
44-
###############################################
45-
# aws_secret_access_key for connection to AWS #
46-
###############################################
47-
# NOTE: this AWS key needs all access to build and deploy SAM
48-
aws_secret_access_key:
49-
5038
################################
5139
# region for connection to AWS #
5240
################################

0 commit comments

Comments
 (0)