Skip to content

Commit

Permalink
Ensure user permissions on build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
tzununbekov committed Feb 26, 2024
1 parent 4123dd0 commit 4c9371a
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,20 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Deb build scripts
run: sudo apt-get install devscripts build-essential lintian dput dh-make python3-paramiko
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Release snapshot
- name: Setup build environment
run: |
sudo apt-get install devscripts build-essential lintian dput dh-make python3-paramiko
echo -e "${{ secrets.GPG_SIGNING_KEY }}" | gpg --import
# workaround for expired key until it gets updated
gpg --quick-set-expire F0AB06E81EEBCED6F69460F12B13D750E4ECCA9D 2025-02-05
mkdir -p ~/.ssh
echo -e "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
mkdir -p /home/runner/.ssh
- name: Release snapshot
run: |
source env.sh
sudo -E go run mage.go -v ${{ matrix.platform }}
go run mage.go -v ${{ matrix.platform }}
- name: Release Go report
if: github.ref == 'refs/heads/master'
Expand Down Expand Up @@ -97,24 +93,20 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install Deb build scripts
run: sudo apt-get install devscripts build-essential lintian dput dh-make python3-paramiko
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Release tag
- name: Setup build environment
run: |
sudo apt-get install devscripts build-essential lintian dput dh-make python3-paramiko
echo -e "${{ secrets.GPG_SIGNING_KEY }}" | gpg --import
# workaround for expired key until it gets updated
gpg --quick-set-expire F0AB06E81EEBCED6F69460F12B13D750E4ECCA9D 2025-02-05
mkdir -p ~/.ssh
echo -e "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 0600 ~/.ssh/id_rsa
mkdir -p /home/runner/.ssh
source build/env.sh
sudo -E go run mage.go -v ${{ matrix.platform }}
- name: Release tag
run: |
source env.sh
go run mage.go -v ${{ matrix.platform }}
post-release:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4c9371a

Please sign in to comment.