Files
netdisco/.github/workflows/test.yml
Oliver Gorwits 96c07499ca Update test.yml
2021-08-16 17:05:33 +01:00

37 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'
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: Make git home
run: sudo -l -u netdisco mkdir /home/netdisco/git
- name: Check out latest code
uses: actions/checkout@v1
with:
path: '../../../netdisco/git'
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
sudo: true
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}.