diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74f9017..3fba500 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,12 @@ jobs: - name: Build package run: make package + + - name: Save deb package as artifact + uses: actions/upload-artifact@v4 + with: + name: deb-package + path: /__w/yeti-cli/*.deb - name: Setup deb-s3 run: gem install deb-s3 @@ -40,3 +46,46 @@ jobs: AWS_ENDPOINT_URL: ${{secrets.DEB_AWS_ENDPOINT}} run: deb-s3 upload --bucket=${{secrets.DEB_AWS_BUCKET}} --prefix=1.13 --codename=bookworm --component=main --visibility=nil --force-path-style --sign=B104E10C35895CFAC0F91473C8D3BC80B6F22179 --gpg-options "\-\-pinentry-mode=loopback \-\-no-tty \-\-batch \-\-yes \-\-passphrase ${{ secrets.GPG_PASSPHRASE }}" ../*.deb + deb12_container: + name: Debian 12 release container + needs: deb12 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Download a single artifact + uses: actions/download-artifact@v4 + with: + name: deb12-package + + - name: Display structure of downloaded files + run: ls -la + + - name: Display path + run: pwd + + - name: Calculate version from ${{github.ref}} + env: + PKG_TAG: ${{github.ref}} + shell: bash + run: echo "##[set-output name=tag;]$(echo ${PKG_TAG#refs/tags/})" + id: extract_tag + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push image + uses: docker/build-push-action@v2 + with: + context: . + file: ci/ssh-image-bookworm.Dockerfile + push: true + tags: ghcr.io/yeti-web/yeti-cli/ssh:${{steps.extract_tag.outputs.tag}} + + diff --git a/ci/ssh-image-bookworm.Dockerfile b/ci/ssh-image-bookworm.Dockerfile new file mode 100644 index 0000000..24f77f9 --- /dev/null +++ b/ci/ssh-image-bookworm.Dockerfile @@ -0,0 +1,10 @@ +FROM debian:bookworm-slim + +ENV DEBIAN_FRONTEND=noninteractive \ + LANG=C.UTF-8 + +RUN apt update && apt -y dist-upgrade && apt install -y ca-certificates openssh-server + +COPY *.deb / +RUN dpkg -i /*.deb || apt install -f -y --no-install-recommends && rm /*.deb + diff --git a/ci/ssh-image-bullseye.Dockerfile b/ci/ssh-image-bullseye.Dockerfile deleted file mode 100644 index f1ba246..0000000 --- a/ci/ssh-image-bullseye.Dockerfile +++ /dev/null @@ -1,13 +0,0 @@ -FROM debian:bullseye-slim - -ENV DEBIAN_FRONTEND=noninteractive \ - LANG=C.UTF-8 - -ADD http://pkg.yeti-switch.org/key.gpg /etc/apt/trusted.gpg.d/yeti.asc - -RUN echo "deb http://pkg.yeti-switch.org/debian/buster 1.12 main" >> /etc/apt/sources.list && \ - chmod 644 /etc/apt/trusted.gpg.d/*.asc - -RUN apt update && apt install -y ca-certificates - -RUN apt update && apt install -y yeti-cli openssh-server