Skip to content

Deploy E2sar rpms and dependency rpms to releases #10

Deploy E2sar rpms and dependency rpms to releases

Deploy E2sar rpms and dependency rpms to releases #10

Workflow file for this run

permissions:
contents: write
name: Deploy E2sar rpms and dependency rpms to releases
on:
workflow_dispatch:
env:
GRPC_VER: 1.54.1
BOOST_VER: 1.85.0
E2SAR_VER: 0.1.5
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
container: ["rockylinux/rockylinux:9.0", "rockylinux/rockylinux:9.5"]
container:
image: ${{ matrix.container }}
permissions:
contents: write
steps:
- name: Install gh
run: |
curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo | tee /etc/yum.repos.d/github-cli.repo
dnf -y install gh
gh --version
- name: Checkout E2SAR code
uses: actions/checkout@v4
with:
path: E2SAR
submodules: false
token: ${{ secrets.CLASSIC_REPO_PAT }}
- name: Prepare a unique name for Artifacts
id: prep_artifact_name
run: |
# Calculate a unique string which applies to the matrix entry
# that we can use to construct unique and valid artifact names.
# We achieve that by squashing runs of characters are invalid
# in artifact names, and also whitespace and dashes, into a
# single dash character. The unique string will appear as
# the environment variable ARTIFACT_NAME in subsequent actions.
name="${{ matrix.container }}"
# The option to enable + in sed regexps differs by OS so we avoid it
name=$(echo -n "$name" | sed -e 's/[ \t:\/\\"<>|*?]/-/g' -e 's/--*/-/g')
echo "ARTIFACT_NAME=$name" >> $GITHUB_ENV
- name: Download built boost and grpc artifact
if: steps.cache.outputs.cache-hit != 'true' # Only run if cache wasn't hit
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
workflow: deps2rpm.yml
name: ${{ env.ARTIFACT_NAME }}-e2sar-deps-${{ env.E2SAR_VER }}-package
path: E2SAR
- name: Download built e2sar rpm
if: steps.cache.outputs.cache-hit != 'true' # Only run if cache wasn't hit
id: download-e2sar-rpm
uses: dawidd6/action-download-artifact@v6
with:
workflow: distroRocky.yml
name: ${{ env.ARTIFACT_NAME }}-e2sar-${{ github.ref_name }}-${{ env.E2SAR_VER }}-package
path: E2SAR
- name: create GH release
run: |
cd E2SAR
gh release create E2SAR-${{ github.ref_name }}-${{ env.E2SAR_VER }}-${{ env.ARTIFACT_NAME }} ./*.rpm
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
shell: bash