Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Om 191 #115

Merged
merged 6 commits into from
May 9, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/build_artefacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Create tar.gz and zip artefacts of dashboars

on:
push:
# branches: [master]
# TODO this combination logic of branch + tag is not working.
tags:
- v*

permissions:
id-token: write
actions: write
contents: write

jobs:
tar_zipping_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag

- name: Create zip or tar files
run: |
cd config/grafana
echo "Tar & GZipping tar files"
VERSION=${GITHUB_REF_NAME#v}
tar cvf aerospike-grafana-dashboards-$VERSION.tar dashboards/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not single step with 'tar czf' ?

gzip aerospike-grafana-dashboards*
# zip -r aerospike-grafana-dashboards-$VERSION.zip dashboards/*
# ls -lrt *.zip
ls -lrt *.tar.gz
- name: Upload Release Asset
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: "${{ steps.get-latest-tag.outputs.tag }}"
run: |
# echo "tag_name $TAG_NAME"
echo

files=$(find config/grafana -type f -name "aerospike-grafana-dashboards*" -printf "$(realpath -s %p) ")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know the exact path. why find ?


for file in $files; do
echo "uploading file === $file to release-tag $TAG_NAME"
gh release upload "$TAG_NAME" "$file"
done

echo
echo "lising of files ... "
echo
Loading