[CI-CD] Updated workflows

This commit is contained in:
Christian Tosta
2025-07-15 04:18:47 -03:00
parent 7b75def10f
commit bc93d34d16
3 changed files with 14 additions and 10 deletions

View File

@@ -9,7 +9,6 @@ jobs:
release-ci:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_metadata.outputs.version }}
tag: ${{ steps.get_metadata.outputs.tag }}
to_release: ${{ steps.newtag.outputs.to_release }}
@@ -20,15 +19,15 @@ jobs:
- name: Install CI dependencies
run: |
sudo apt-get update
sudo apt-get -y -qq install cmake g++ gcc
sudo apt-get -y -qq install cmake openssl g++ gcc
- name: Get latest package metadata
id: get_metadata
run: |
cmake --fresh -B build -S .
echo "tag=v$(cat build/version)" >> $GITHUB_OUTPUT
echo "version=$(cat build/version)" >> $GITHUB_OUTPUT
echo "hash=$(sha256sum build/hash | sed 's/\s.*//g')" >> $GITHUB_OUTPUT
- name: Check if package version has corresponding git tag
id: tagged
shell: bash
@@ -43,7 +42,11 @@ jobs:
id: newtag
if: steps.tagged.outputs.tagged == 0
run: |
git tag ${{ steps.get_metadata.outputs.tag }} \
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git tag -a ${{ steps.get_metadata.outputs.tag }} \
-m "New cert chain was released" \
--trailer "SHA256:${{ steps.get_metadata.outputs.hash }}" \
&& echo to_release=1 >> $GITHUB_OUTPUT \
&& git push origin ${{ steps.get_metadata.outputs.tag }} \
|| exit 0
@@ -53,6 +56,5 @@ jobs:
uses: ./.github/workflows/fedora.yml
with:
containers: "['fedora:latest', 'fedora:41']"
version: ${{ needs.release-ci.outputs.version }}
to_release: ${{ needs.release-ci.outputs.to_release }}
tag: ${{ needs.release-ci.outputs.tag }}