diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c005a12..db742d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,13 +17,10 @@ jobs: matrix: gover: - "1.21" - - "1.20" - "1.19" debver: - - bookworm - include: - - gover: "1.19" - debver: bullseye + - bullseye + - bookworm runs-on: ubuntu-latest diff --git a/Dockerfile b/Dockerfile index a4a2f3c..47b954d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ ARG DEB_VERSION ARG DEBIAN_FRONTEND=noninteractive # Install deps RUN dpkg --add-architecture arm64 \ - && dpkg --add-architecture ppc64el \ && dpkg --add-architecture s390x \ && apt-get update \ && apt-get dist-upgrade -y -q \ @@ -43,8 +42,7 @@ RUN dpkg --add-architecture arm64 \ unzip \ sudo \ jq \ - rpm \ - ruby-dev + rpm # install docker cli RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \ @@ -62,8 +60,8 @@ RUN curl -fsSL https://github.com/goreleaser/goreleaser/releases/latest/download # experimental features are not enabled for the CLI - to mitigate that. ENV DOCKER_CLI_EXPERIMENTAL=enabled -# Upload to packagecloud.io -RUN gem install rake package_cloud +# pc.sh needs packagecloud +RUN go install github.com/tyklabs/packagecloud@latest COPY unlock-agent.sh pc.sh / COPY daemon.json /etc/docker/daemon.json diff --git a/pc.sh b/pc.sh index 96ae513..07b7874 100755 --- a/pc.sh +++ b/pc.sh @@ -1,9 +1,11 @@ #!/bin/bash -# goreleaser calls a custom publisher for each artefact -# packagecloud expects the distro version when pushing -# this script bridges both by choosing the appropriate list of distro versions from $DEBVERS and $RPMVERS -# $REPO, $DEBVERS and $RPMVERS are expected to be set by goreleaser +# goreleaser calls a custom publisher for each artefact packagecloud +# expects the distro version when pushing this script bridges both by +# choosing the appropriate list of distro versions from $DEBVERS and +# $RPMVERS +# $REPO, $DEBVERS and $RPMVERS are expected to be set by the +# user REQUIRED_VARS="PACKAGECLOUD_TOKEN REPO" @@ -63,7 +65,7 @@ for i in $vers; do [[ ! -s ${pkg} ]] && echo "File is empty or does not exists" && exit 1 # Yank packages first to enable tag re-use - package_cloud yank $REPO/$i $(basename $pkg) || true - package_cloud push $REPO/$i $pkg + packagecloud rm $REPO/$i $(basename $pkg) || true + packagecloud push $REPO/$i $pkg done