fix: git authentication and setup in daily release
Fix git authentication using token.
@@ -20,6 +20,7 @@ jobs:
uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}
+ persist-credentials: false
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
@@ -28,8 +29,8 @@ jobs:
uses: actions/cache@v1
with:
path: ~/.m2
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
+ key: release-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: release-${{ runner.os }}-m2
- name: Daily release of ${{ matrix.branch }}
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
@@ -38,7 +39,7 @@ jobs:
QUAYIO_PASSWORD: ${{ secrets.QUAYIO_PASSWORD }}
SYNDESISCI_TOKEN: ${{ secrets.SYNDESISCI_TOKEN }}
run: |
- git config user.email admin@syndesis.io
- git config user.name 'Syndesis CI'
- git config 'http.https://github.com.extraheader' "Authorization: basic ${SYNDESISCI_TOKEN}"
+ git config --global user.email admin@syndesis.io
+ git config --global user.name 'Syndesis CI'
+ git config --global 'http.https://github.com/.extraheader' "Authorization: basic $(echo -n x-access-token:${SYNDESISCI_TOKEN}|base64 --wrap=0)"
tools/bin/syndesis release --snapshot-release --git-remote origin --docker-user "${DOCKER_USER}" --docker-password "${DOCKER_PASSWORD}" --quayio-user "${QUAYIO_USER}" --quayio-password "${QUAYIO_PASSWORD}"
