-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 989 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: CI
on:
pull_request:
push:
branches:
- main
paths-ignore:
- README.md
permissions:
contents: read
id-token: write
jobs:
debian:
name: Deb packages
runs-on: ubuntu-latest
steps:
- 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
for PKG_FILE in $(find pkgs -name "*.deb")
do
curl -fsS -u "${{ secrets.PACKAGECLOUD_TOKEN }}:" -XPOST \
-F "package[distro_version_id]=35" \
-F "package[package_file]=@${PKG_FILE}" \
https://packagecloud.io/api/v1/repos/cloudamqp/etcd/packages.json
done