Skip to content

Fix action

Fix action #3

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
paths-ignore:
- README.md
permissions:
contents: read
id-token: write
jobs:
debian:
name: Debian pkg
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- base_image: ubuntu
version: 24.04
codename: noble
steps:
#- name: Checkout
# uses: actions/checkout@v4
- name: Make deb packages
uses: docker/build-push-action@v6
with:
file: Dockerfile
pull: true
outputs: pkgs
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: etcd-pkgs
path: pkgs
- 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 builds -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