Skip to content

Commit a06e0d6

Browse files
authored
quick post on cleaning up secrets being shared to repo
1 parent 2f9d189 commit a06e0d6

File tree

2 files changed

+60
-45
lines changed

2 files changed

+60
-45
lines changed
Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
1-
name: Azure Static Web Apps CI/CD
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
types: [opened, synchronize, reopened, closed]
9-
branches:
10-
- main
11-
12-
jobs:
13-
build_and_deploy_job:
14-
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
15-
runs-on: ubuntu-latest
16-
name: Build and Deploy Job
17-
steps:
18-
- uses: actions/checkout@v2
19-
with:
20-
submodules: true
21-
- name: Build And Deploy
22-
id: builddeploy
23-
uses: Azure/static-web-apps-deploy@v1
24-
with:
25-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_FIELD_0BD9E4D00 }}
26-
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
27-
action: "upload"
28-
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
29-
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
30-
app_location: "/" # App source code path
31-
api_location: "api" # Api source code path - optional
32-
output_location: "" # Built app content directory - optional
33-
###### End of Repository/Build Configurations ######
34-
35-
close_pull_request_job:
36-
if: github.event_name == 'pull_request' && github.event.action == 'closed'
37-
runs-on: ubuntu-latest
38-
name: Close Pull Request Job
39-
steps:
40-
- name: Close Pull Request
41-
id: closepullrequest
42-
uses: Azure/static-web-apps-deploy@v1
43-
with:
44-
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_FIELD_0BD9E4D00 }}
45-
action: "close"
1+
name: Azure Static Web Apps CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened, closed]
9+
branches:
10+
- main
11+
12+
jobs:
13+
build_and_deploy_job:
14+
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
15+
runs-on: ubuntu-latest
16+
name: Build and Deploy Job
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
- name: Build And Deploy
22+
id: builddeploy
23+
uses: Azure/static-web-apps-deploy@v1
24+
with:
25+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_FIELD_0BD9E4D00 }}
26+
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
27+
action: "upload"
28+
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
29+
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
30+
app_location: "/" # App source code path
31+
api_location: "api" # Api source code path - optional
32+
output_location: "" # Built app content directory - optional
33+
###### End of Repository/Build Configurations ######
34+
35+
close_pull_request_job:
36+
if: github.event_name == 'pull_request' && github.event.action == 'closed'
37+
runs-on: ubuntu-latest
38+
name: Close Pull Request Job
39+
steps:
40+
- name: Close Pull Request
41+
id: closepullrequest
42+
uses: Azure/static-web-apps-deploy@v1
43+
with:
44+
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_ICY_FIELD_0BD9E4D00 }}
45+
action: "close"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
layout: post
3+
published: true
4+
title: Keep your secrets out of your source code
5+
date: '2021-07-20'
6+
subtitle: Protect your secrets and clean up if you accidentally over share
7+
---
8+
9+
## Problem
10+
We accidentally committed our secrets (password or secret key) to GitHub
11+
12+
## Solution
13+
1. Prevent secrets from being committed: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository#avoiding-accidental-commits-in-the-future
14+
2. Clean up: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/removing-sensitive-data-from-a-repository
15+

0 commit comments

Comments
 (0)