-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (41 loc) · 1.69 KB
/
ci-azure-onboarding-script.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}