mirror of
https://github.com/ekaaty/ca-certificates-brazil.git
synced 2025-12-06 01:22:38 -03:00
[CI-CD] Updated workflows
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
SHELL := bash
|
||||
|
||||
source:
|
||||
dnf -y install cmake gcc gcc-c++
|
||||
dnf -y install cmake gcc gcc-c++ openssl
|
||||
cmake --fresh -DBUILD_RPMS=ON -B build -S .
|
||||
cmake --build build --target srpm
|
||||
|
||||
|
||||
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -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 }}
|
||||
|
||||
8
.github/workflows/fedora.yml
vendored
8
.github/workflows/fedora.yml
vendored
@@ -12,9 +12,6 @@ on:
|
||||
default: "0"
|
||||
required: false
|
||||
type: string
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -34,6 +31,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Prepare - install build dependencies
|
||||
if: inputs.to_release == 1
|
||||
run: |
|
||||
dnf -y install \
|
||||
cmake \
|
||||
@@ -46,18 +44,22 @@ jobs:
|
||||
tar
|
||||
|
||||
- name: Prepare - setup RPM build tree
|
||||
if: inputs.to_release == 1
|
||||
run: |
|
||||
rpmdev-setuptree
|
||||
|
||||
- name: Prepare - configure the source
|
||||
if: inputs.to_release == 1
|
||||
run: |
|
||||
cmake -B $(pwd)/build -S $(pwd)
|
||||
|
||||
- name: Build - create source tarball and SRPM package
|
||||
if: inputs.to_release == 1
|
||||
run: |
|
||||
cmake --build $(pwd)/build --target srpm
|
||||
|
||||
- name: Build - create RPM package
|
||||
if: inputs.to_release == 1
|
||||
run: |
|
||||
cmake --build $(pwd)/build --target rpms
|
||||
|
||||
|
||||
Reference in New Issue
Block a user