Skip to content

Commit

Permalink
Public tag with proper tag
Browse files Browse the repository at this point in the history
  • Loading branch information
unkcpz committed May 8, 2024
1 parent 32c6dbb commit 6da8e43
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 46 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,10 @@ jobs:
type=raw,value=lapack-${{ env.LAPACK_VERSION }},enable=${{ github.ref_type == 'tag' && startsWith(github.ref_name, 'v') }}
type=match,pattern=v(\d{4}\.\d{4}(-.+)?),group=1
- name: Determine source image
id: images
run: |
src=$(echo '${{ inputs.images }}'| jq -cr '.[("${{ matrix.target }}"|ascii_upcase|sub("-"; "_"; "g")) + "_IMAGE"]')
echo "src=$src" | tee -a "${GITHUB_OUTPUT}"
- name: Push image
uses: akhilerm/tag-push-action@v2.2.0
with:
src: ${{ needs.build.outputs.image }}
src: ${{ steps.images.outputs.src }}
dst: ${{ steps.meta.outputs.tags }}

- name: Docker Hub Description
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/extract-image-name.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#
# Example output (real output is on one line):
#
# image="ghcr.io/pspgen/build-machine@sha256:79a0f984b9e03b733304fda809ad3e8eec8416992ff334052d75da00cadb8f12"
# image="ghcr.io/pspgen/build-machine@sha256-79a0f984b9e03b733304fda809ad3e8eec8416992ff334052d75da00cadb8f12"
# }
#
# This json output is later turned to environment variables using fromJson() GHA builtin
Expand All @@ -30,5 +30,5 @@ if [[ -z ${BAKE_METADATA-} ]];then
exit 1
fi

image=$(echo "${BAKE_METADATA}" | jq -c '. as $base | to_entries[] | [(.value."image.name"|split(",")[0]),(.value."containerimage.digest")]|join("@")')
image=$(echo "${BAKE_METADATA}" | jq -c '. as $base | to_entries[] | [(.value."image.name"|split(",")[0]),(.value."containerimage.digest" | sub(":";"-"))]|join("@")')
echo "image=$image"
74 changes: 37 additions & 37 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,41 @@
FROM base-image

# Tool chain for building
RUN apt-get update && apt-get install -y \
build-essential \
automake \
autoconf \
libtool \
wget \
gfortran-7 && \
apt-get clean && rm -rf /var/lib/apt/lists/*

ARG GNU_COMPILER_VERSION

RUN update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GNU_COMPILER_VERSION} 2 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GNU_COMPILER_VERSION} 2

WORKDIR /build

ARG LAPACK_VERSION

RUN wget -c -O lapack.tar.gz https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz && \
mkdir -p lapack && \
tar xf lapack.tar.gz -C lapack --strip-components=1 && \
cd lapack && \
cp INSTALL/make.inc.gfortran make.inc && \
make lapacklib blaslib && \
mkdir -p /usr/local/lapack/lib && \
cp *.a /usr/local/lapack/lib

ARG LIBXC_VERSION
RUN wget -c -O libxc.tar.gz https://gitlab.com/libxc/libxc/-/archive/4.3.4/libxc-4.3.4.tar.gz && \
mkdir -p libxc && \
tar xf libxc.tar.gz -C libxc --strip-components=1 && \
cd libxc && \
autoreconf -i && \
./configure --prefix=/usr/local/libxc && \
make && make install

RUN rm -rf /build
#RUN apt-get update && apt-get install -y \
# build-essential \
# automake \
# autoconf \
# libtool \
# wget \
# gfortran-7 && \
# apt-get clean && rm -rf /var/lib/apt/lists/*
#
#ARG GNU_COMPILER_VERSION
#
#RUN update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-${GNU_COMPILER_VERSION} 2 && \
# update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GNU_COMPILER_VERSION} 2
#
#WORKDIR /build
#
#ARG LAPACK_VERSION
#
#RUN wget -c -O lapack.tar.gz https://github.com/Reference-LAPACK/lapack/archive/refs/tags/v${LAPACK_VERSION}.tar.gz && \
# mkdir -p lapack && \
# tar xf lapack.tar.gz -C lapack --strip-components=1 && \
# cd lapack && \
# cp INSTALL/make.inc.gfortran make.inc && \
# make lapacklib blaslib && \
# mkdir -p /usr/local/lapack/lib && \
# cp *.a /usr/local/lapack/lib
#
#ARG LIBXC_VERSION
#RUN wget -c -O libxc.tar.gz https://gitlab.com/libxc/libxc/-/archive/4.3.4/libxc-4.3.4.tar.gz && \
# mkdir -p libxc && \
# tar xf libxc.tar.gz -C libxc --strip-components=1 && \
# cd libxc && \
# autoreconf -i && \
# ./configure --prefix=/usr/local/libxc && \
# make && make install
#
#RUN rm -rf /build
WORKDIR /

0 comments on commit 6da8e43

Please sign in to comment.