Skip to content
This repository was archived by the owner on Mar 9, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions github.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: snipeit

on:
push:
branches: devcontainer

jobs:
deploy:

runs-on: ubuntu-latest


steps:
- name: Checkout
uses: actions/checkout@v2

- name: Login to GitHub Container Registry
uses: ./
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_PASS }}

- name: Checkout
uses: actions/checkout@v3

- name: log in dockerhub
uses: ./
with:
username: ${{ secrets.DOCKERUSER }}
password: ${{ secrets.DOCKERHUB_PASS }}
# Runs a set of commands using the runners shell
- name: executing remote ssh commands using ssh key
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.PRIVATEKEY }}
port: ${{ secrets.PORT }}

script: |
pwd
git clone https://github.com/kesarivamshi/Snipe-IT.git
cd /home/ubuntu/Snipe-IT
git pull origin main
sudo docker compose up --build -d