Skip to content

Commit

Permalink
test2
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchietti committed Jan 24, 2025
1 parent 895e824 commit 2393066
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/publish-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,35 @@ permissions:
packages: write

jobs:
set-env:
download-tmce-plugin:
runs-on: ubuntu-latest
steps:
- name: Set TMCE_TOKEN environment variable
run: echo "TMCE_TOKEN=${{ secrets.WEBTOP_PR }}" >> $GITHUB_ENV
- name: Check and download TMCE plugin
run: |
tmce_jar="tmce-plugin.jar"
if [ -n "${{ secrets.WEBTOP_PR }}" ]; then
echo "Downloading tmce plugin..."
curl -H "Authorization: token ${{ secrets.WEBTOP_PR }}" -H 'Accept: application/vnd.github.v3.raw' -o $tmce_jar -L \
https://api.github.com/repos/nethesis/webtop-tmceplugins/contents/$tmce_jar?ref=master
else
echo "TMCE_TOKEN not set, skipping tmce plugin download"
fi
mv $tmce_jar webtop-tmceplugins.jar
- name: Upload TMCE plugin artifact
uses: actions/upload-artifact@v2
with:
name: tmce-plugin
path: webtop-tmceplugins.jar
download-artifact:
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: tmce-plugin
publish-images:
if: github.run_number > 1
uses: NethServer/ns8-github-actions/.github/workflows/publish-branch.yml@v1
needs: download-artifact
secrets:
netrcb64: ${{ secrets.NETRCB64 }}
10 changes: 2 additions & 8 deletions build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repobase="${REPOBASE:-ghcr.io/nethserver}"
#Get WebTop version
webtop_version=$(cat ${PWD}/webtop5-build/VERSION)
# tmce plugin jar
tmce_jar="webtop-tmceplugins-6.3.1.0.jar"
tmce_jar="webtop-tmceplugins.jar"

# Download of external deps and CHECKSUM verification:
if ! compgen -G "pecbridge-*.tar.gz"; then
Expand Down Expand Up @@ -68,13 +68,7 @@ fi
env

# Download tmce plugin if GITHUB_TOKEN is set
if [ -n "${GITHUB_TOKEN}" ]; then
echo "Downloading tmce plugin..."
curl -H "Authorization: token $GITHUB_TOKEN" -H 'Accept: application/vnd.github.v3.raw' -o $tmce_jar -L \
https://api.github.com/repos/nethesis/webtop-tmceplugins/contents/$tmce_jar?ref=master
else
echo "TMCE_TOKEN not set, skipping tmce plugin download"
fi
find

#Create webtop-webapp container
reponame="webtop-webapp"
Expand Down

0 comments on commit 2393066

Please sign in to comment.