Skip to content

Update workflow secrets and action versions #12

Update workflow secrets and action versions

Update workflow secrets and action versions #12

Workflow file for this run

name: release
on:
push:
tags:
- '*'
branches:
- main
pull_request:
jobs:
build:
name: Build the wget binary
runs-on: ubuntu-latest
container:
image: ghcr.io/toltec-dev/base:v1.2
steps:
- name: Checkout the Git repository
uses: actions/checkout@v4
- name: Build the binary
run: ./build
- name: Store the resulting artifact
uses: actions/upload-artifact@v4
with:
name: wget
path: /root/wget
release:
name: Publish the wget binary
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Fetch the built binary
uses: actions/download-artifact@v4
with:
name: wget
- name: Transfer packages and index
run: |
mkdir -p private
chmod 700 private
echo "${{ secrets.SSH_PRIVATE_KEY }}" > private/id_rsa
echo "${{ secrets.SSH_KNOWN_HOSTS }}" > private/known_hosts
chmod 600 private/*
version="$(echo "${{ github.ref }}" | cut -d / -f 3)"
scp -P "${{ secrets.SSH_PORT }}" \
-i private/id_rsa \
-o UserKnownHostsFile=private/known_hosts \
wget "${{ secrets.REMOTE_SSH }}":/srv/toltec/thirdparty/bin/wget-"$version"