Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-sinina authored Dec 14, 2024
1 parent 403f8d0 commit f562523
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,29 @@ jobs:
name: deb12-package
path: /__w/yeti-web/*.deb

- name: Setup deb-s3
run: gem install deb-s3
- 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: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}

- name: Upload package
- name: calculate repo branch
env:
AWS_ACCESS_KEY_ID: ${{secrets.DEB_AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.DEB_AWS_SECRET_ACCESS_KEY}}
AWS_ENDPOINT_URL: ${{secrets.DEB_AWS_ENDPOINT}}
PKG_TAG: ${{github.ref}}
run: v=${PKG_TAG##*/};major_version=${v%\.[0-9]*};deb-s3 upload --bucket=${{secrets.DEB_AWS_BUCKET}} --prefix=$major_version --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

shell: bash
run: echo "##[set-output name=tag;]$(v=${PKG_TAG##*/};major_version=${v%\.[0-9]*};echo $major_version)"
id: extract_branch

- uses: yeti-switch/upload-debian-pkg-action@v2
with:
pkgs: '../*.deb'
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
s3_prefix: ${{steps.extract_branch.outputs.tag}}
s3_access_key_id: ${{ secrets.DEB_AWS_ACCESS_KEY_ID }}
s3_secret_access_key: ${{ secrets.DEB_AWS_SECRET_ACCESS_KEY }}
s3_endpoint_url: ${{ secrets.DEB_AWS_ENDPOINT }}

deb12_container:
name: Debian 12 release container
Expand Down Expand Up @@ -94,4 +100,3 @@ jobs:
file: ci/stable-package.Dockerfile
push: true
tags: ghcr.io/yeti-switch/yeti-web:${{steps.extract_tag.outputs.tag}}

0 comments on commit f562523

Please sign in to comment.