Skip to content

Commit

Permalink
Merge pull request #14 from testainers/dev
Browse files Browse the repository at this point in the history
Version 0.1.3.
  • Loading branch information
edufolly authored Jul 12, 2023
2 parents b8d236f + 09c8670 commit c4a1f85
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,19 @@ jobs:
- name: Code Checkout
uses: actions/checkout@v3

- name: Install jq
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update -y
sudo apt-get install jq -y
- name: Get Version
run: |
VERSION=$(grep 'version:' version.yaml | cut -c 10-)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "REPO=$GITHUB_REPOSITORY" >> $GITHUB_ENV
echo "OWNER=$GITHUB_REPOSITORY_OWNER" >> $GITHUB_ENV
- name: Check version is used.
- name: Check if version is used
run: |
URL=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/latest
LATEST=$(curl --silent "$URL" | jq -r .name)
if [ "$LATEST" == "v$VERSION" ]; then
echo "Version is used."
if [ "$LATEST" == "$VERSION" ]; then
echo "Version already used: v$VERSION"
exit 1
fi
Expand Down Expand Up @@ -64,5 +57,5 @@ jobs:
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: v${{ env.VERSION }}
tag: ${{ env.VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
sshd-container
</h1>

---

[![BuildWithLove](https://img.shields.io/badge/%20built%20with-%20%E2%9D%A4-ff69b4.svg "build with love")](https://github.com/testainers/sshd-container/stargazers)
[![Docker Image Version](https://img.shields.io/docker/v/testainers/sshd-container)](https://github.com/testainers/sshd-container)
[![Licence](https://img.shields.io/github/license/testainers/sshd-container?color=blue)](https://github.com/testainers/sshd-container)
[![Build](https://img.shields.io/github/actions/workflow/status/testainers/sshd-container/main.yml?branch=main)](https://github.com/testainers/sshd-container)
[![Docker Image Version](https://img.shields.io/docker/v/testainers/sshd-container)](https://hub.docker.com/r/testainers/sshd-container/tags)
[![Licence](https://img.shields.io/github/license/testainers/sshd-container?color=blue)](https://github.com/testainers/sshd-container/blob/main/LICENCE)
[![Build](https://img.shields.io/github/actions/workflow/status/testainers/sshd-container/main.yml?branch=main)](https://github.com/testainers/sshd-container/releases/latest)

The small container image is designed specifically for testing SSH connections.

Expand Down
8 changes: 5 additions & 3 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
set -e
set -x

docker build . --no-cache -t sshd-container
docker build . --no-cache -t sshd-container-test

docker run --rm --name sshd -p 22022:22 -d sshd-container
docker run --rm --name sshd -p 22022:22 -d sshd-container-test

sleep 2

Expand All @@ -21,7 +21,7 @@ sleep 2
docker run --rm --name sshd \
-e "SSHD_USER=test" \
-e "SSHD_PASSWORD=test" \
-p 22022:22 -d sshd-container
-p 22022:22 -d sshd-container-test

sleep 2

Expand All @@ -32,3 +32,5 @@ sshpass -v -p "test" ssh \
-p 22022 test@127.0.0.1 uptime

docker stop -t 1 sshd

docker image rm sshd-container-test
2 changes: 1 addition & 1 deletion version.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 0.1.2
version: 0.1.3

0 comments on commit c4a1f85

Please sign in to comment.