Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #136 from jim-deriv/jim/feq-2076/resolve-security-…
Browse files Browse the repository at this point in the history
…issues

[FEQ] Jim/FEQ-2076/resolve security issues
  • Loading branch information
habib-deriv authored Apr 16, 2024
2 parents c6b3d8c + 8426762 commit e2a1722
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/actions/invalidate_master_cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ runs:
using: composite
steps:
- name: save_cache
uses: actions/cache/save@v3
uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2
with:
path: ./node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('./package-lock.json') }}
37 changes: 0 additions & 37 deletions .github/actions/notify_slack/action.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/actions/tag/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ runs:

steps:
- name: Set Version
env:
RELEASE_TYPE: ${{ inputs.RELEASE_TYPE }}
id: set_version
run: |
current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
version="${{ inputs.RELEASE_TYPE }}-GH_Run#:${{ github.run_number }}-Date:$current_date"
version="${RELEASE_TYPE}-GH_Run#:${{ github.run_number }}-Date:$current_date"
echo "Setting version to: $version"
echo "version=$version" >> $GITHUB_ENV
shell: bash
24 changes: 17 additions & 7 deletions .github/workflows/release_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
tags:
- production_*
env:
RELEASE_TYPE: Production
jobs:
build_test_and_publish:
name: Build, Test and Publish to Cloudflare Pages Production
Expand All @@ -11,7 +13,7 @@ jobs:
RELEASE_VERSION: ${{ steps.extract_version.outputs.RELEASE_VERSION }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install npm packages
uses: "./.github/actions/npm_install_from_cache"
- name: Build
Expand All @@ -38,11 +40,19 @@ jobs:
needs: [build_test_and_publish]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Conclusion
uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5
- name: Create Slack Message
id: create_slack_message
run: |
if [ $WORKFLOW_CONCLUSION == "success" ]; then
echo "MESSAGE=$RELEASE_TYPE Release succeeded for Sindabad with version ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }}" >> $GITHUB_OUTPUT
else
echo "MESSAGE=$RELEASE_TYPE Release failed for Sindabad with version ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION }}" >> $GITHUB_OUTPUT
fi
- name: Send Slack Notification
uses: "./.github/actions/send_slack_notifications"
uses: "deriv-com/shared-actions/.github/actions/send_slack_notification@master"
with:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ env.WORKFLOW_CONCLUSION }}
release_type: Production
version: ${{ needs.build_test_and_publish.outputs.RELEASE_VERSION}}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
MESSAGE: ${{ steps.create_slack_message.outputs.MESSAGE }}
2 changes: 1 addition & 1 deletion .github/workflows/release_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Tag
uses: "./.github/actions/tag"
- name: Install npm packages
Expand Down

0 comments on commit e2a1722

Please sign in to comment.