Skip to content

Commit 9a44205

Browse files
Merge pull request #1 from go-feature-flag/initial-commit
Add CI to upload file
2 parents 80f3402 + b395786 commit 9a44205

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "GO Feature Flag linting"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [ opened, synchronize, reopened ]
8+
9+
jobs:
10+
lint-flag:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: data_export_file
17+
uses: go-feature-flag/gofeatureflag-lint-action@v1
18+
with:
19+
flag-file: ./flags/flags.goff.yaml

.github/workflows/deployer.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Deploy to S3"
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
lint-flag:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: data_export_file
15+
uses: go-feature-flag/gofeatureflag-lint-action@v1
16+
with:
17+
flag-file: ./flags/flags.goff.yaml
18+
19+
- uses: keithweaver/[email protected]
20+
with:
21+
command: cp
22+
source: ./flags/flags.goff.yaml
23+
destination: s3://${{ secrets.AWS_CONF_BUCKET }}/${{ secrets.AWS_CONF_BUCKET_FOLDER }}/flags.goff.yaml
24+
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
25+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
26+
aws_region: eu-west-1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

flags/flags.goff.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
new-admin-access:
2+
variations:
3+
default_var: false
4+
false_var: false
5+
true_var: true
6+
defaultRule:
7+
percentage:
8+
false_var: 70
9+
true_var: 30
10+
11+
flag-only-for-admin:
12+
variations:
13+
default_var: false
14+
false_var: false
15+
true_var: true
16+
targeting:
17+
- query: admin eq true
18+
percentage:
19+
false_var: 0
20+
true_var: 100
21+
defaultRule:
22+
variation: default_var

0 commit comments

Comments
 (0)