Skip to content

Commit

Permalink
Fix action (#1)
Browse files Browse the repository at this point in the history
fixes action
  • Loading branch information
viktorerlingsson authored Oct 24, 2024
1 parent 0da00d4 commit 01e4f30
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,11 @@ permissions:

jobs:
debian:
name: Debian pkg
name: Deb packages
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- base_image: ubuntu
version: 24.04
codename: noble

steps:
- name: Checkout
uses: actions/checkout@v3
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
- name: Make deb packages
uses: docker/build-push-action@v6
with:
file: Dockerfile
pull: true
Expand All @@ -38,6 +28,16 @@ jobs:
with:
name: etcd-pkgs
path: pkgs
#- name: Upload deb packages to Packagecloud
# run: find pkgs -name "*.deb" -exec curl -fsSu "${{ secrets.packagecloud_token }}:" -F "package[distro_version_id]=35" -F "package[package_file]=@{}" -XPOST https://packagecloud.io/api/v1/repos/84codes/etcd/packages.json \;
# if: github.ref == 'refs/heads/main'
- name: Upload deb packages to Packagecloud
if: github.ref == 'refs/heads/main'
run: |
set -eux
curl -fsSO -u "${{ secrets.PACKAGECLOUD_TOKEN }}:" https://packagecloud.io/api/v1/distributions.json
for PKG_FILE in $(find pkgs -name "*.deb")
do
DIST_ID=$(jq ".deb[] | select(.index_name == \"ubuntu\").versions[] | select(.index_name == \"noble\").id" distributions.json)
curl -fsS -u "${{ secrets.PACKAGECLOUD_TOKEN }}:" -XPOST \
-F "package[distro_version_id]=${DIST_ID}" \
-F "package[package_file]=@${PKG_FILE}" \
https://packagecloud.io/api/v1/repos/84codes/etcd/packages.json
done

0 comments on commit 01e4f30

Please sign in to comment.