This commit is contained in:
parent
5abee4c3bb
commit
71f752c46e
1 changed files with 20 additions and 8 deletions
|
|
@ -12,16 +12,28 @@ jobs:
|
||||||
image: golang:1.27
|
image: golang:1.27
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install packaging tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y dpkg-dev git curl
|
apt-get install -y dpkg-dev git curl openssh-client
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
env:
|
||||||
|
FORGEJO_SSH_KEY: ${{ secrets.FORGEJO_SSH_KEY }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
printf '%s\n' "${FORGEJO_SSH_KEY}" > ~/.ssh/forgejo_runner
|
||||||
|
chmod 600 ~/.ssh/forgejo_runner
|
||||||
|
# Accept Forgejo SSH host key without prompting.
|
||||||
|
ssh-keyscan -p 554 git-ssh.janvete.com >> ~/.ssh/known_hosts 2>/dev/null || \
|
||||||
|
ssh-keyscan git-ssh.janvete.com >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||||
|
echo "GIT_SSH_COMMAND=ssh -i ~/.ssh/forgejo_runner -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
env:
|
env:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
GIT_SSH_COMMAND: ssh -i ~/.ssh/forgejo_runner -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts
|
||||||
run: |
|
run: |
|
||||||
git clone "https://seth:${FORGEJO_TOKEN}@git.janvete.com/seth/Caddyview.git" src
|
git clone ssh://git@git-ssh.janvete.com:554/seth/Caddyview.git src
|
||||||
cd src
|
cd src
|
||||||
git checkout "${{ github.ref_name }}"
|
git checkout "${{ github.ref_name }}"
|
||||||
|
|
||||||
|
|
@ -114,7 +126,7 @@ jobs:
|
||||||
- name: Update Homebrew tap
|
- name: Update Homebrew tap
|
||||||
working-directory: src
|
working-directory: src
|
||||||
env:
|
env:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
GIT_SSH_COMMAND: ssh -i ~/.ssh/forgejo_runner -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
VER=${VERSION#v}
|
VER=${VERSION#v}
|
||||||
|
|
@ -122,7 +134,7 @@ jobs:
|
||||||
SHA_AMD64=$(sha256sum dist/caddyview-${VERSION}-darwin-amd64.tar.gz | awk '{print $1}')
|
SHA_AMD64=$(sha256sum dist/caddyview-${VERSION}-darwin-amd64.tar.gz | awk '{print $1}')
|
||||||
SHA_LINUX=$(sha256sum dist/caddyview-${VERSION}-linux-amd64.tar.gz | awk '{print $1}')
|
SHA_LINUX=$(sha256sum dist/caddyview-${VERSION}-linux-amd64.tar.gz | awk '{print $1}')
|
||||||
|
|
||||||
git clone "https://seth:${FORGEJO_TOKEN}@git.janvete.com/seth/homebrew-tools.git" tap
|
git clone ssh://git@git-ssh.janvete.com:554/seth/homebrew-tools.git tap
|
||||||
|
|
||||||
cat > tap/Formula/caddyview.rb << FORMULA
|
cat > tap/Formula/caddyview.rb << FORMULA
|
||||||
class Caddyview < Formula
|
class Caddyview < Formula
|
||||||
|
|
@ -168,12 +180,12 @@ jobs:
|
||||||
- name: Update APT repository
|
- name: Update APT repository
|
||||||
working-directory: src
|
working-directory: src
|
||||||
env:
|
env:
|
||||||
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
GIT_SSH_COMMAND: ssh -i ~/.ssh/forgejo_runner -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts
|
||||||
run: |
|
run: |
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
VER=${VERSION#v}
|
VER=${VERSION#v}
|
||||||
|
|
||||||
git clone "https://seth:${FORGEJO_TOKEN}@git.janvete.com/seth/apt.git" apt-repo
|
git clone ssh://git@git-ssh.janvete.com:554/seth/apt.git apt-repo
|
||||||
cp "dist/caddyview_${VER}_amd64.deb" apt-repo/
|
cp "dist/caddyview_${VER}_amd64.deb" apt-repo/
|
||||||
|
|
||||||
cd apt-repo
|
cd apt-repo
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue