Merge pull request #11 from gofireflyio/INFL-12146_fix-bad-storageAcc… #46
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
name: Firefly Azure Onboarding Script | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- scripts/azure_onboarding/** | |
jobs: | |
CI: | |
env: | |
SLACK_CHANNEL: prod-deployments | |
S3_BUCKET_CLI: infralight-templates-public | |
AWS_REGION: us-east-1 | |
name: "Firefly Azure Onboarding Script Release" | |
runs-on: ubuntu-latest | |
if: (github.ref == 'refs/heads/main' && github.event_name == 'push') || (github.event_name == 'workflow_dispatch') | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.CI_PROD_CRED_KEY }} | |
aws-secret-access-key: ${{ secrets.CI_PROD_CRED_SECRET }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Upload AWS Fetching Template | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --exclude='*' --include='azure_onboarding.ps1' | |
env: | |
SOURCE_DIR: 'scripts/azure_onboarding' | |
AWS_S3_BUCKET: ${{ env.S3_BUCKET_CLI }} | |
- name: Slack Notification | |
if: ${{ success() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_ICON: https://assets-global.website-files.com/5d514fd9493b0575f03520bd/5d8e0b39fd776a3c238e8753_icons8_infinity_large_filled_2.svg | |
SLACK_MESSAGE: "${{ github.event.inputs.dest }} Azure script released to S3 from ${{ github.ref }}" | |
SLACK_TITLE: "${{ github.event.inputs.dest }} Azure Script release notification" | |
SLACK_USERNAME: cicdBot | |
SLACK_WEBHOOK: ${{ secrets.CI_SLACK_WEBHOOK }} |