-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (72 loc) · 2.56 KB
/
env.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: ENV Variables
on: push
env:
WF_ENV: Available to all jobs
jobs:
decrypt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Decrypt file
env:
PASSPHRASE: ${{secrets.PASSPHRASE}}
run: gpg --quiet --batch --yes --decrypt --passphrase="$PASSPHRASE" --output $HOME/secret.json secret_json.json.gpg
- name: Print File content
run: cat $HOME/secret.json
# create-issue:
# runs-on: ubuntu-latest
# steps:
# - name: Push a random file
# run: |
# pwd
# ls -a
# git init
# git remote add origin "https://$GITHUB_ACTOR:${{secrets.GITHUB_TOKEN}}@github.com/$GITHUB_REPOSITORY.git"
# git config --global user.email "[email protected]"
# git config --global user.name "my-bot"
# git fetch
# git checkout master
# git branch --set-upstream-to=origin/master
# git pull
# ls -a
# echo $RANDOM >> random.txt
# git add -A
# git commit -m "Added random file"
# git push
# - name: Create issue using REST API
# run: |
# curl --request POST \
# --url https://api.github.com/repos/${{ github.repository }}/issues \
# --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
# --header 'content-type: application/json' \
# --data '{
# "title": "Automated issue for commit: ${{ github.sha }}",
# "body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_."
# }'
log-env:
runs-on: ubuntu-latest
env:
JOB_ENV: Vailable to all steps in log-env job
steps:
- name: LOG Env Variables
env:
STEP_ENV: Available to only this step
run: |
echo "WF_ENV: ${WF_ENV}"
echo "JOB_ENV: ${JOB_ENV}"
echo "STEP_ENV: ${STEP_ENV}"
log-default-env:
runs-on: ubuntu-latest
steps:
- name: Default ENV Variables
run: |
echo "HOME: ${HOME}"
echo "GITHUB_WORKFLOW: ${GITHUB_WORKFLOW}"
echo "GITHUB_ACTION: ${GITHUB_ACTION}"
echo "GITHUB_ACTIONs: ${GITHUB_ACTIONS}"
echo "GITHUB_ACTOR: ${GITHUB_ACTOR}"
echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}"
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
echo "GITHUB_SHA: ${GITHUB_SHA}"
echo "GITHUB_REF: ${GITHUB_REF}"