Skip to content

Commit

Permalink
Fixed auto tagging for dockerimages (#113)
Browse files Browse the repository at this point in the history
* Fixed auto tagging for dockerimages

* Fixed typo.

* Added check + support for wget if curl does not exist on the target system in setup_tsl.sh
  • Loading branch information
JPietrzykTUD authored Feb 20, 2025
1 parent 9b7a72f commit 5c3e595
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build_and_push_dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,16 @@ jobs:
shell: bash
run: |
set -x
if [ "${{ github.event_name }}" = "pull_request" ]; then
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "tag=${{ github.head_ref }}" >> "${GITHUB_OUTPUT}"
else
echo "tag=${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
if [[ "${{ github.ref_type }}" == "tag" ]]; then
TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref }})
BRANCH=$(git branch -r --contains "${TAG_COMMIT}" | sed 's/origin\///' | grep -v HEAD | head -n 1 | awk '{$1=$1};1')
echo "tag=${BRANCH}" >> "${GITHUB_OUTPUT}"
else
echo "tag=${{ github.ref_name }}" >> "${GITHUB_OUTPUT}"
fi
fi
- name: 'Set image name output'
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/release/tarball/setup_tsl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ mkdir -p "${out_path}"
tmp_dir=$(mktemp -ud /tmp/libtsl-dev-XXXXXX)
mkdir -p "${tmp_dir}"

curl -L "https://github.com/db-tu-dresden/TSL/releases/latest/download/libtsl-dev.tar.gz" -o ${tmp_dir}/libtsl-dev.tar.gz
if type curl > /dev/null 2>&1; then
curl -L "https://github.com/db-tu-dresden/TSL/releases/latest/download/libtsl-dev.tar.gz" -o ${tmp_dir}/libtsl-dev.tar.gz
elif type wget > /dev/null 2>&1; then
wget -O ${tmp_dir}/libtsl-dev.tar.gz "https://github.com/db-tu-dresden/TSL/releases/latest/download/libtsl-dev.tar.gz"
else
echo "Please install curl or wget to download the library"
exit 1
fi
tar -xzf "${tmp_dir}/libtsl-dev.tar.gz" -C "${tmp_dir}"
chmod 755 "${tmp_dir}"/*.sh
supported_path=$("${tmp_dir}"/select_flavor.sh "${tmp_dir}")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The latest release is available under [Releases](https://github.com/db-tu-dresde

To download the TSL to the current working directory, just run
~~~console
curl -L -s "https://github.com/db-tu-dresden/TSL/releases/latest/download/install_tsl.sh" | /bin/bash
curl -L -s "https://github.com/db-tu-dresden/TSL/releases/latest/download/setup_tsl.sh" | /bin/bash
~~~

If you want to "install" the TSL (the header files will be placed at /usr/include/tsl), we prepared an `rpm` and a `deb` package.
Expand Down

0 comments on commit 5c3e595

Please sign in to comment.