Skip to content

Commit

Permalink
added automatic container updates every sunday so that openSSH stays …
Browse files Browse the repository at this point in the history
…up to date
  • Loading branch information
Kalitsune committed Mar 28, 2023
1 parent 789b221 commit 2d6cb45
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI for releases

on:
schedule:
- cron: '0 0 * * 0' # every Sunday at midnight

jobs:
build-and-push-docker-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_NAME: "reversed-ssh-tunnel" # can't contain uppercases
steps:
-
name: Checkout repository
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Get latest tag
id: latest_tag
run: echo ::set-output name=tag::$(git describe --tags $(git rev-list --tags --max-count=1))
-
name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.REPOSITORY_OWNER }}/${{ env.IMAGE_NAME }}
${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
tags: |
${{ steps.latest_tag.outputs.tag }}
latest
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
latest
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/README.md
-
name: Build and push
uses: docker/build-push-action@v3
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ Create a lightweight Alpine Linux based SSH tunnel to a host. Uses pure SSH, no

FORKED FROM jujhars13/docker-ssh-tunnel but reversed the tunnel direction.

## Advantages

- Stay up to date (with weekly builds that ensure that OpenSSH is up to date)

- Lightweight

- Easy to use

- No need to install anything on the host or the client

## Required Parameters

| Variable | Description | default |
Expand Down

0 comments on commit 2d6cb45

Please sign in to comment.