Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Dec 5, 2024
1 parent 36fa616 commit 914f390
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
name: Checkout packages
uses: actions/checkout@v4
with: { ref: pdi-main }
- id: version
run: |
if grep '^Version: *main' pdi/pdi.spec
then echo "pdi_prefix=pdi-main." >> $GITHUB_OUTPUT
else echo "pdi_prefix=" >> $GITHUB_OUTPUT
fi
- uses: docker/login-action@v3
with: { registry: "ghcr.io", username: "${{ github.actor }}", password: "${{ secrets.GITHUB_TOKEN }}" }
- name: Checkout builder script
Expand All @@ -47,18 +53,18 @@ jobs:
DISTRIB: ${{ matrix.distrib }}
run: |
python3.8 pkg_builder/pkgbuild -D ${DISTRIB} -j 3 -p "${KEY_PASSPHRASE}"
ls -R ./${{ matrix.distrib }}
ls -R ./${{steps.version.outputs.pdi_prefix}}${{ matrix.distrib }}
- name: Upload artifact
uses: actions/upload-artifact@v4
id: artifact
with:
name: ${{ matrix.distrib }}
path: ./${{ matrix.distrib }}
name: ${{steps.version.outputs.pdi_prefix}}${{ matrix.distrib }}
path: ./${{steps.version.outputs.pdi_prefix}}${{ matrix.distrib }}
- name: Make artifact descriptor container
run: |
echo "${{ github.run_id }}" > run_id
tar -c run_id | docker import - ghcr.io/pdidev/pkgs/lastbuild:${{ matrix.distrib }}
docker push ghcr.io/pdidev/pkgs/lastbuild:${{ matrix.distrib }}
tar -c run_id | docker import - ghcr.io/pdidev/pkgs/lastbuild:${{steps.version.outputs.pdi_prefix}}${{ matrix.distrib }}
docker push ghcr.io/pdidev/pkgs/lastbuild:${{steps.version.outputs.pdi_prefix}}${{ matrix.distrib }}
aggregate:
if: ${{ always() && github.event_name != 'pull_request' }}
needs: build
Expand All @@ -83,7 +89,6 @@ jobs:
docker pull ghcr.io/pdidev/pkgs/lastbuild:${DISTRIB} || continue
CID="$(docker create ghcr.io/pdidev/pkgs/lastbuild:${DISTRIB} /bin/bash)"
docker cp "${CID}:run_id" "${DISTRIB}.run_id"
echo "${DISTRIB}_run_id=$(cat ${DISTRIB}.run_id)\n"
echo "${DISTRIB}_run_id=$(cat ${DISTRIB}.run_id)\n" >> $GITHUB_OUTPUT
done
- uses: actions/download-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions build.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ distribs:
versions: [ supported, testing, sid ]
repository:
<<: *repository
path: "debian"
path: "pdi-main.debian"
url: "https://repo.pdi.dev/debian/"
ubuntu:
<<: *distribution
repository:
<<: *repository
path: "ubuntu"
path: "pdi-main.ubuntu"
url: "https://repo.pdi.dev/ubuntu/"
fedora:
<<: *distribution
repository:
<<: *repository
path: "fedora"
path: "pdi-main.fedora"
url: "https://repo.pdi.dev/fedora/"
packages:
paraconf:
Expand Down
3 changes: 3 additions & 0 deletions release
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ then
sed "s/%changelog/%changelog\n\* ${RPM_DATE} - ${AUTHOR}\n- Upstream release main/" -i pdi*/*.spec
sed 1p -i pdi/debian/changelog pdiplugin*/debian/changelog
sed "1s/(.*$/(${DEB_PKG_VERSION}-1) unstable devel; urgency=medium\n\n * Upstream release ${VERSION}\n\n -- ${AUTHOR} ${DEB_DATE}\n/" -i pdi/debian/changelog pdiplugin*/debian/changelog
sed 's/path: "/path: "pdi-main./' build.conf
else
sed 's/path: "pdi-main\./path: "/' build.conf
fi

sed \
Expand Down

0 comments on commit 914f390

Please sign in to comment.