Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FlandreDaisuki committed Apr 12, 2023
0 parents commit b62c113
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Create and publish a Docker image

on:
release:
types: [published]

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
# aka docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@69f6fc9d46f2f8bf0d5491e4aabe0bb8c6a4678a
# aka docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@c84f38281176d4c9cdb1626ffafcd6b3911b5d94
# aka docker/[email protected]
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.wcscfg
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"cSpell.words": [
"handsupshop",
"wcscfg",
"wcscmd"
],
"markdown.extension.toc.levels": "2..6"
}
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3.11.3-alpine3.17

RUN pip install wcs-python3-sdk chardet

CMD [ "wcscmd" ]
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# docker-wcscmd

- [Installation](#installation)
- [Getting Started](#getting-started)
- [Create config file](#create-config-file)
- [Setup Configuration](#setup-configuration)
- [Alias Command](#alias-command)
- [Command list](#command-list)

## Installation

```shell
docker pull ghcr.io/handsupshop/docker-wcscmd
```

## Getting Started

### Create config file

```shell
touch "$HOME/.wcscfg"
```

### Setup Configuration

```shell
HOST_CONFIG_FILE="$HOME/.wcscfg"
docker run --rm -it \
-v "$HOST_CONFIG_FILE:/root/.wcscfg:rw" \
ghcr.io/handsupshop/docker-wcscmd wcscmd --configure
```

### Alias Command

```shell
alias wcscmd='docker run --rm -it -v "$HOME/.wcscfg:/root/.wcscfg:rw" ghcr.io/handsupshop/docker-wcscmd wcscmd'
```

## Command list

[Wangsu-Cloud-Storage/wcs-python3-sdk](https://github.com/Wangsu-Cloud-Storage/wcs-python3-sdk#wcscmd%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8)

0 comments on commit b62c113

Please sign in to comment.