diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 86fba1a..a557a06 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -157,6 +157,64 @@ jobs: name: ubuntubuild path: ${{ env.FILENAME }} + + ubuntu22: + needs: [centos7] + runs-on: ubuntu-latest + + steps: + - name: checkout dxtoolkit code + uses: actions/checkout@master + + - name: add version + run: | + mkdir dxtoolkit2 + chmod 777 dxtoolkit2 + cd ./lib + mv Toolkit_helpers.pm Toolkit_helpers.orig.pm + cat Toolkit_helpers.orig.pm | sed -r -e "s/([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.?[[:digit:]]?)/\1-dev-${GITHUB_SHA}/" > Toolkit_helpers.pm + grep "version" Toolkit_helpers.pm + + - name: Set up a Perl container + #uses: pioro/dxtoolkit@develop + uses: docker://pioro/dxperlubuntu22:526 + with: + ENCKEY: ${{ secrets.ENCKEY }} + + - name: Get the version + id: get_version + run: | + if (echo ${GITHUB_REF} | grep "/tags/" > /dev/null); then + SOURCE_TAG=${GITHUB_REF#refs/tags/} + elif (echo ${GITHUB_REF} | grep "/heads/" > /dev/null); then + SOURCE_TAG=${GITHUB_REF#refs/heads/} + else + exit 1 + fi + FILENAME="dxtoolkit2-${SOURCE_TAG}-ubuntu2204-installer.tar.gz" + echo SOURCE_TAG=$SOURCE_TAG >> $GITHUB_ENV + echo FILENAME=$FILENAME >> $GITHUB_ENV + + - name: add examples + run: | + gzip -d dxtoolkit.tar.gz + cp bin/dxtools.conf.example dxtoolkit2/dxtools.conf.example + cp bin/dxusers.csv.example dxtoolkit2/dxusers.csv.example + tar -rvf dxtoolkit.tar dxtoolkit2/dxtools.conf.example dxtoolkit2/dxusers.csv.example + gzip dxtoolkit.tar + + - name: compress toolkit + run: | + mv dxtoolkit.tar.gz ${{ env.FILENAME }} + + - name: Upload ubuntu + uses: actions/upload-artifact@v1 + with: + name: ubuntu22build + path: ${{ env.FILENAME }} + + + centos6: needs: [centos7] runs-on: ubuntu-latest diff --git a/build/ubuntu22/Dockerfile b/build/ubuntu22/Dockerfile new file mode 100644 index 0000000..51f7707 --- /dev/null +++ b/build/ubuntu22/Dockerfile @@ -0,0 +1,37 @@ +FROM ubuntu:22.04 + +RUN apt-get update \ + && apt-get install -y libpar-packer-perl \ + && apt-get install -y libjson-pp-perl \ + && apt-get install -y libdate-manip-perl \ + && apt-get install -y libdatetime-format-dateparse-perl \ + && apt-get install -y libcrypt-cbc-perl \ + && apt-get install -y libcrypt-blowfish-perl \ + && apt-get install -y libtext-csv-perl \ + && apt-get install -y libtry-tiny-perl \ + && apt-get install -y libparse-http-useragent-perl \ + && apt-get install -y libnet-ssleay-perl \ + && apt-get install -y libio-socket-ssl-perl \ + && apt-get install -y libfilter-perl \ + && apt-get install -y libterm-readkey-perl \ + && apt-get install -y cpanminus \ + && apt-get install -y make \ + && apt-get install -y gcc \ + && apt-get install -y libssl-dev \ + && apt-get install -y libwww-perl \ + && cpanm DateTime::Event::Cron::Quartz \ + && cpanm Log::Syslog::Fast@0.65 \ + && cpanm Filter::Crypto::Decrypt + +RUN mkdir -p /github/workspace +RUN mkdir -p /github/home +RUN mkdir -p /github/workflow +COPY entrypoint.sh /entrypoint.sh +WORKDIR /github/workspace +RUN chmod +x /entrypoint.sh + + +ENTRYPOINT ["/entrypoint.sh"] + + + diff --git a/build/ubuntu22/entrypoint.sh b/build/ubuntu22/entrypoint.sh new file mode 100644 index 0000000..2e2e4e9 --- /dev/null +++ b/build/ubuntu22/entrypoint.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +export DELPHIX_OUTPUT=/github/workspace/dxtoolkit2 +mkdir $DELPHIX_OUTPUT + +cd /github/workspace/lib +mv dbutils.pm dbutils.orig.pm +cat dbutils.orig.pm | sed -e "s/put your encryption key here/${INPUT_ENCKEY}/" > dbutils.pm +ls -l dbutils* + +cd /github/workspace/bin +pp -u -I /github/workspace/lib -l /usr/lib/x86_64-linux-gnu/libcrypto.so.3 -l /usr/lib/x86_64-linux-gnu/libssl.so.3 -M Text::CSV_PP -M List::MoreUtils::PP -M Crypt::Blowfish \ + -F Crypto=dbutils\.pm$ -M Filter::Crypto::Decrypt -o $DELPHIX_OUTPUT/runner `ls dx_*.pl | xargs` + +cd $DELPHIX_OUTPUT + +echo #!/bin/bash > install.sh +echo LIST_OF_SCRIPTS=\( >> install.sh + +for i in /github/workspace/bin/dx_*.pl ; do + name=`basename -s .pl $i`; + echo $name >> install.sh +done + +echo \) >> install.sh +echo >> install.sh +echo >> install.sh +echo for i in \"\$\{LIST_OF_SCRIPTS\[\@\]\}\" >> install.sh +echo do >> install.sh +echo echo \$i >> install.sh +echo ln -sf runner \$i >> install.sh +echo done >> install.sh + +# for i in /github/workspace/bin/dx_*.pl ; do name=`basename -s .pl $i`; ln -s runner $name; done + +cd /github/workspace +tar czvf /github/workspace/dxtoolkit.tar.gz dxtoolkit2/ + + + + + + + +