No description
Find a file
Hicham e692c527a8
All checks were successful
Continuous Integration / No action (push) Successful in 8s
Continuous Integration / apt install (push) Successful in 14s
Continuous Integration / apt upgrade (push) Successful in 18s
Add badge in README
2025-08-21 13:53:45 +02:00
.forgejo/workflows Fix: remove 'upgrade' from job name in CI file 2025-06-17 00:04:38 +02:00
action.yml Implement action 2025-06-08 02:19:43 +02:00
LICENSE Initial commit 2025-06-07 21:32:56 +02:00
README.md Add badge in README 2025-08-21 13:53:45 +02:00

apt-upgrade-install

Build status

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"