No description
.forgejo/workflows | ||
action.yml | ||
LICENSE | ||
README.md |
apt-upgrade-install
Upgrade and/or install packages using apt
Inputs
parameter | description | default |
---|---|---|
sudo |
Set it to true to use sudo |
"" |
upgrade |
Set it to true to upgrade |
"" |
packages |
Packages to install | "" |
All inputs are optional.
If packages
is empty, then no packages will be installed.
Example
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://git.hicham.party/actions/apt-upgrade-install@v1
with:
# sudo: true
# upgrade: true
packages: rsync
- uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy
run: |
remote_path="/home/${{ secrets.HOST_USER }}/$(basename ${GITHUB_REPOSITORY})"
ssh_opts="ssh -p ${{ secrets.HOST_SSH_PORT }} -o StrictHostKeyChecking=no"
user_and_server="${{ secrets.HOST_USER }}@${{ secrets.HOST }}"
rsync -e "$ssh_opts" -rauL compose.yml $user_and_server:${remote_path}
$ssh_opts $user_and_server "cd ${remote_path}; ./deploy.sh"