@@ -31,99 +31,52 @@ jobs:
31
31
- name : Checkout repository
32
32
uses : actions/checkout@v2
33
33
34
- - name : Set up Vault environment variables
35
- run : |
36
- echo "VAULT_ADDR=https://rgonzovault.us:8200" >> $GITHUB_ENV
37
- echo "VAULT_ROLE=github-actions-role" >> $GITHUB_ENV
38
- echo "JWT_AUDIENCE=sigstore" >> $GITHUB_ENV
39
-
40
- - name : Authenticate with Vault using JWT
41
- uses : hashicorp/vault-action@v2
42
- with :
43
- url : ${{ secrets.VAULT_URL }}
44
- # caCertificate: ${{ secrets.VAULT_CA_CERT }}
45
- role : ${{ env.VAULT_ROLE }}
46
- method : jwt
47
- jwtGithubAudience : ${{ env.JWT_AUDIENCE }}
48
- # env:
49
- # VAULT_TOKEN: ${{ secrets.VAULT_TOKEN }}
50
-
51
- - name : Retrieve secret from Vault
52
- run : |
53
- secret=$(vault kv get -field=demo_secret secret/gh-demo)
54
- echo "Retrieved secret: $secret"
55
-
56
- - name : Use the secret in subsequent steps
57
- run : |
58
- echo "Use the retrieved secret in your action"
59
- # Example: use the secret for deployment or other tasks
60
- # Further actions can be added here
61
-
62
- # ###Get the current commit hash
63
- # - name: Get current commit hash
64
- # id: get_hash
65
- # run: echo "commit_hash=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
66
- # ###List the contents of the data directory
67
- # - name: List contents of the data directory
68
- # run: ls
69
34
70
- # ###Set up R
71
- # - name: Set up R
72
- # uses: r-lib/actions/setup-r@v2
73
- #
74
- # ###Install the necessary R library dependencies
75
- # - name: Install Dependencies
76
- # uses: r-lib/actions/setup-r-dependencies@v2
77
- # with:
78
- # cache-version: 2
79
- # extra-packages: |
80
- # any::dplyr
81
- # any::readxl
82
- #
83
- # - name: Run randomize columns R script
84
- # run: |
85
- # Rscript randomized_data_set.R ${{ env.commit_hash }} \
86
- # $LEFT_PROB_0 $LEFT_PROB_1 \
87
- # $WORK_ACCIDENT_PROB_0 $WORK_ACCIDENT_PROB_1 \
88
- # $SAT_LEVEL $EVAL_LEVEL
89
- #
90
- # - name: List contents of the data directory
91
- # run: ls data
92
-
93
- # - name: Upload modified dataset
94
- # uses: actions/upload-artifact@v4
95
- # with:
96
- # name: modified-data
97
- # path: data/
98
- #
99
- # - name: Configure Git
100
- # run: |
101
- # git config --global user.name 'github-actions'
102
- # git config --global user.email '[email protected] '
103
- #
104
- # - name: Commit Changes
105
- # run: |
106
- # git add data/
107
- # git commit -m "Add new analysis report for latest XLSX File"
108
- # git push
109
- # env:
110
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111
-
112
-
113
- # - name: Print GitHub JWT token
114
- # env:
115
- # ACTIONS_ID_TOKEN_REQUEST_TOKEN: ${{ secrets.ACTIONS_ID_TOKEN_REQUEST_TOKEN }}
116
- # run: echo "JWT Token: $ACTIONS_ID_TOKEN_REQUEST_TOKEN"
117
- #
118
- # - name: Get Secrets
119
- # id: secrets
120
- # uses: hashicorp/vault-action@v2
121
- # with:
122
- # url: ${{ secrets.VAULT_URL }}
123
- # role: github-actions-role
124
- # method: jwt
125
- # tlsSkipVerify: false
126
- # secrets: |
127
- # secret/data/gh-demo demo_secret
35
+ # ##Get the current commit hash
36
+ - name : Get current commit hash
37
+ id : get_hash
38
+ run : echo "commit_hash=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
39
+ # ##List the contents of the data directory
40
+ - name : List contents of the data directory
41
+ run : ls
42
+ # ##Set up R
43
+ - name : Set up R
44
+ uses : r-lib/actions/setup-r@v2
45
+
46
+ # ##Install the necessary R library dependencies
47
+ - name : Install Dependencies
48
+ uses : r-lib/actions/setup-r-dependencies@v2
49
+ with :
50
+ cache-version : 2
51
+ extra-packages : |
52
+ any::dplyr
53
+ any::readxl
54
+
55
+ - name : Run randomize columns R script
56
+ run : |
57
+ Rscript randomized_data_set.R ${{ env.commit_hash }} \
58
+ $LEFT_PROB_0 $LEFT_PROB_1 \
59
+ $WORK_ACCIDENT_PROB_0 $WORK_ACCIDENT_PROB_1 \
60
+ $SAT_LEVEL $EVAL_LEVEL
61
+
62
+ - name : List contents of the data directory
63
+ run : ls data
64
+
65
+ - name : Upload modified dataset
66
+ uses : actions/upload-artifact@v4
67
+ with :
68
+ name : modified-data
69
+ path : data/
128
70
71
+ - name : Configure Git
72
+ run : |
73
+ git config --global user.name 'github-actions'
74
+ git config --global user.email '[email protected] '
129
75
76
+ - name : Commit Changes
77
+ run : |
78
+ git add data/
79
+ git commit -m "Add new analysis report for latest XLSX File"
80
+ git push
81
+ env :
82
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments