Skip to content

Commit

Permalink
.github.workflows/ci.yml: Use separate SSH config for deploy job
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Langowski <[email protected]>
  • Loading branch information
PLangowski committed Jul 24, 2024
1 parent 80bc82c commit 25e4fce
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ jobs:
chmod 600 ~/.ssh/dts-ci-key
echo -e ${SSH_KEY_GITEA} > ~/.ssh/gitea-key
chmod 600 ~/.ssh/gitea-key
cp ~/.ssh/config ~/.ssh/config-old
echo -e "\n
Host git.3mdeb.com\n
HostName git.3mdeb.com\n
IdentityFile ~/.ssh/gitea-key\n
IdentitiesOnly yes" >> ~/.ssh/config
IdentitiesOnly yes" >> ~/.ssh/config_deploy
- name: Get DTS version
id: dts-ver
shell: bash
Expand All @@ -73,7 +72,7 @@ jobs:
shell: bash
run: |
DTS_VER="${{steps.dts-ver.outputs.DTS_VER}}"
ssh -i ~/.ssh/dts-ci-key [email protected] "mkdir -p boot/dts/${DTS_VER}"
ssh -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy [email protected] "mkdir -p boot/dts/${DTS_VER}"
cd build/tmp/deploy/images/genericx86-64/
cp bzImage bzImage-${DTS_VER}
cp dts-base-image-genericx86-64.cpio.gz dts-base-image-${DTS_VER}.cpio.gz
Expand All @@ -82,10 +81,10 @@ jobs:
# do not release iso image until issue is fixed
# see: https://github.com/dasharo/dasharo-issues/issues/288
# cp dts-base-image-genericx86-64.iso dts-base-image-${DTS_VER}.iso
scp -i ~/.ssh/dts-ci-key bzImage-${DTS_VER} [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.cpio.gz [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.wic.gz [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.wic.bmap [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy bzImage-${DTS_VER} [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy dts-base-image-${DTS_VER}.cpio.gz [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy dts-base-image-${DTS_VER}.wic.gz [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy dts-base-image-${DTS_VER}.wic.bmap [email protected]:boot/dts/${DTS_VER}/
# do not release iso image until issue is fixed
# see: https://github.com/dasharo/dasharo-issues/issues/288
# scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.iso [email protected]:boot/dts/${DTS_VER}/
Expand All @@ -101,10 +100,10 @@ jobs:
# do not release iso image until issue is fixed
# see: https://github.com/dasharo/dasharo-issues/issues/288
# sha256sum dts-base-image-${DTS_VER}.iso > dts-base-image-${DTS_VER}.iso.sha256
scp -i ~/.ssh/dts-ci-key bzImage-${DTS_VER}.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.cpio.gz.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.wic.gz.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.wic.bmap.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy bzImage-${DTS_VER}.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy dts-base-image-${DTS_VER}.cpio.gz.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy dts-base-image-${DTS_VER}.wic.gz.sha256 [email protected]:boot/dts/${DTS_VER}/
scp -i ~/.ssh/dts-ci-key -F ~/.ssh/config_deploy dts-base-image-${DTS_VER}.wic.bmap.sha256 [email protected]:boot/dts/${DTS_VER}/
# do not release iso image until issue is fixed
# see: https://github.com/dasharo/dasharo-issues/issues/288
# scp -i ~/.ssh/dts-ci-key dts-base-image-${DTS_VER}.iso.sha256 [email protected]:boot/dts/${DTS_VER}/
Expand Down Expand Up @@ -140,5 +139,3 @@ jobs:
rm -rf dts-release-cicd-pipeline
rm -f ~/.ssh/gitea-key
rm -rf build
rm -f ~/.ssh/config
mv ~/.ssh/config-old ~/.ssh/config

0 comments on commit 25e4fce

Please sign in to comment.