Skip to content

Commit

Permalink
fix CI auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Dani-Koza-AF committed Oct 27, 2024
1 parent 6a716f3 commit b8fe363
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/deploy-to-QA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
environment: Staging
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.CI_DEV_GITHUB_TOKEN }}
persist-credentials: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -17,13 +20,18 @@ jobs:
run: |
npm i rimraf
- name: Login to Github
- name: Setup Git Authentication
env:
COMMIT_AUTHOR: ${{ secrets.CI_COMMIT_AUTHOR }}
COMMIT_EMAIL: ${{ secrets.CI_COMMIT_EMAIL }}
MY_PERSONAL_ACCESS_TOKEN: ${{ secrets.CI_DEV_GITHUB_TOKEN }}
run: |
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git config --global credential.helper 'cache --timeout=300'
git config --global --add "credential.https://github.com.username" "x-access-token"
echo "https://x-access-token:[email protected]" > ~/.git-credentials
- uses: mdecoleman/[email protected]
id: vars
with:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/pre-release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to Github
with:
token: ${{ secrets.CI_DEV_GITHUB_TOKEN }}
persist-credentials: true

- name: Setup Git Authentication
env:
COMMIT_AUTHOR: ${{ secrets.CI_COMMIT_AUTHOR }}
COMMIT_EMAIL: ${{ secrets.CI_COMMIT_EMAIL }}
MY_PERSONAL_ACCESS_TOKEN: ${{ secrets.CI_DEV_GITHUB_TOKEN }}
run: |
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git config --global credential.helper 'cache --timeout=300'
git config --global --add "credential.https://github.com.username" "x-access-token"
echo "https://x-access-token:[email protected]" > ~/.git-credentials
- uses: mdecoleman/[email protected]
id: vars
with:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/release-Production-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.CI_DEV_GITHUB_TOKEN }}
persist-credentials: true
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand All @@ -37,13 +40,18 @@ jobs:
run: |
npm i rimraf
- name: Login to Github
- name: Setup Git Authentication
env:
COMMIT_AUTHOR: ${{ secrets.CI_COMMIT_AUTHOR }}
COMMIT_EMAIL: ${{ secrets.CI_COMMIT_EMAIL }}
COMMIT_AUTHOR: ${{ secrets.CI_COMMIT_AUTHOR }}
COMMIT_EMAIL: ${{ secrets.CI_COMMIT_EMAIL }}
MY_PERSONAL_ACCESS_TOKEN: ${{ secrets.CI_DEV_GITHUB_TOKEN }}
run: |
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git config --global user.name $COMMIT_AUTHOR
git config --global user.email $COMMIT_EMAIL
git config --global credential.helper 'cache --timeout=300'
git config --global --add "credential.https://github.com.username" "x-access-token"
echo "https://x-access-token:[email protected]" > ~/.git-credentials
- uses: mdecoleman/[email protected]
id: vars
with:
Expand Down

0 comments on commit b8fe363

Please sign in to comment.