Skip to content

Commit

Permalink
Update node.js.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mnagaraju5628 committed Aug 8, 2024
1 parent 01b64a9 commit da7a0ec
Showing 1 changed file with 8 additions and 33 deletions.
41 changes: 8 additions & 33 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,16 @@ on:

jobs:
deploy:

runs-on: self-hosted

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm install
- name: Decrypt credentials
run: |
# Path variables
CREDENTIALS_ENC="/home/mnagaraju/actions-runner/Testproject-inno/credentials.enc"
ENCRYPTION_KEY="/home/mnagaraju/actions-runner/Testproject-inno/encryption_key.txt"
CREDENTIALS="/home/mnagaraju/actions-runner/Testproject-inno/credentials.txt"
- name: Set execute permissions for decryption script
run: |
chmod +x /home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh
# Decrypt the credentials
openssl enc -aes-256-cbc -pbkdf2 -d -in $CREDENTIALS_ENC -out $CREDENTIALS -pass file:$ENCRYPTION_KEY
- name: Run decryption script
run: |
/home/mnagaraju/actions-runner/Testproject-inno/decrypt.sh
if [ $? -ne 0 ]; then
echo "Decryption failed"
exit 1
fi
echo "Decryption succeeded"
- name: Deploy with Docker Compose
run: |
- name: Deploy with Docker Compose
run: |
docker-compose -f /home/mnagaraju/actions-runner/Testproject-inno/docker-compose-test.yml up --build -d

0 comments on commit da7a0ec

Please sign in to comment.