Skip to content

add github workflows #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
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
45 changes: 45 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '41 4 * * 4'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: go
build-mode: autobuild
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "main" ]
tags: [ "*" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@
[![License: MIT](https://img.shields.io/badge/License-MIT%202.0-blue.svg)](https://github.com/sergkondr/docker-tree/blob/main/LICENSE)
[![GitHub release](https://img.shields.io/github/release/sergkondr/docker-tree.svg)](https://github.com/sergkondr/docker-tree/releases/latest)
[![Go Report Card](https://goreportcard.com/badge/github.com/sergkondr/docker-tree)](https://goreportcard.com/report/github.com/sergkondr/docker-tree)
[![Go](https://github.com/sergkondr/docker-tree/actions/workflows/go.yml/badge.svg)](https://github.com/sergkondr/docker-tree/actions/workflows/go.yml)
[![CodeQL](https://github.com/sergkondr/docker-ps/actions/workflows/codeql.yml/badge.svg)](https://github.com/sergkondr/docker-ps/actions/workflows/codeql.yml)


This command shows the directory tree of a Docker image, like the 'tree' command.
Provide the image name and an optional tag or digest to view the file structure inside the image.
This command shows the directory tree of a Docker image, like the 'tree' command.
Provide the image name and an optional tag or digest to view the file structure inside the image.
You can also specify a directory to see the file tree relative to this directory.

This is not a replacement for the amazing [Dive](https://github.com/wagoodman/dive) utility, but it works as a Docker plugin, so you might find it simpler and more convenient
Think of this app mainly as an attempt to understand how Docker images work and how to create Docker plugins. However, it does work, and I hope you find it useful.
This is not a replacement for the amazing [Dive](https://github.com/wagoodman/dive) utility, but it works as a Docker
plugin, so you might find it simpler and more convenient
Think of this app mainly as an attempt to understand how Docker images work and how to create Docker plugins. However,
it does work, and I hope you find it useful.

### Install

```
mv ./docker-tree ~/.docker/cli-plugins/docker-tree
```

### Usage

```shell
# Absent image will be pulled automatically
➜ docker tree alpine:3.20 /etc/ssl
processing image: alpine:3.20
ssl/
Expand Down
Loading