Skip to content

CI on push release tag #74

CI on push release tag

CI on push release tag #74

Workflow file for this run

name: CI on push tag
on:
push:
tags:
- '*'
jobs:
deploy-images:
name: Deploy DTS artifacts on boot.dasharo.com
if: always()
runs-on: self-hosted
steps:
- name: Prepare SSH key
shell: bash
env:
SSH_KEY: ${{secrets.SSH_KEY}}
SSH_KEY_GITEA: ${{secrets.SSH_KEY_GITEA}}
run: |
echo -e ${SSH_KEY} | sed 's/^ *//' > ~/.ssh/dts-ci-key
chmod 600 ~/.ssh/dts-ci-key
echo ${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
- name: Get DTS version
id: dts-ver
shell: bash
run: |
echo "DTS_VER=1.2.9" >> $GITHUB_OUTPUT
- name: Trigger signing
shell: bash
run: |
DTS_VER="${{steps.dts-ver.outputs.DTS_VER}}"
git clone ssh://[email protected]:2222/3mdeb/dts-release-cicd-pipeline.git
cd dts-release-cicd-pipeline
# Only for tests:
git chekcout cicd-pipeline
git tag `echo $DTS_VER | tr -d "v"` HEAD^
#
git push origin main --tags
cleanup:
name: Cleanup
if: always()
needs: deploy-images
runs-on: self-hosted
steps:
- name: Cleanup after deployment
shell: bash
run: |
rm -rf ~/.ssh/dts-ci-key
rm -rf dts-release-cicd-pipeline
rm -f ~/.ssh/gitea-key
rm -f ~/.ssh/config
mv ~/.ssh/config-old ~/.ssh/config