35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Test Netdisco
 | 
						|
on:
 | 
						|
  workflow_dispatch:
 | 
						|
    inputs:
 | 
						|
      debug_enabled:
 | 
						|
        description: 'Run debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'     
 | 
						|
        required: false
 | 
						|
        default:  false
 | 
						|
#  push:
 | 
						|
#    branches:
 | 
						|
#      - master
 | 
						|
jobs:
 | 
						|
  build:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
    container:
 | 
						|
      image: 'netdisco/netdisco:latest-do'
 | 
						|
      options: '--user root --entrypoint /bin/ash'
 | 
						|
      volumes:
 | 
						|
        - '/home/runner/work/netdisco/netdisco:/github/workspace'
 | 
						|
    steps:
 | 
						|
    - name: Get the Tag
 | 
						|
      id: get_tag
 | 
						|
      run: echo ::set-output name=TAGVALUE::${GITHUB_REF#refs/tags/}
 | 
						|
    - name: Install packages
 | 
						|
      run: apk add openssh xz tmux bash curl sudo
 | 
						|
    - name: Install fake apt-get
 | 
						|
      run: echo 'if [ "$1" == "update" ]; then exec apk update; else exec apk add openssh xz tmux bash curl sudo; fi' > /usr/local/bin/apt-get && chmod +x /usr/local/bin/apt-get
 | 
						|
    - name: Check out latest code
 | 
						|
      uses: actions/checkout@v1
 | 
						|
    - name: Setup tmate session
 | 
						|
      uses: mxschmitt/action-tmate@v3
 | 
						|
      with:
 | 
						|
        sudo: true
 | 
						|
      if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}.
 |