Skip to content

feat(workflows): add workflow for deploying sshd image #1

feat(workflows): add workflow for deploying sshd image

feat(workflows): add workflow for deploying sshd image #1

name: Build Image for SSHD Tunnel
on:
push:
branches:
- master
jobs:
build_push:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tunnel_image
steps:
- name: Check Out Repo
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Docker image metadata
uses: docker/metadata-action@v5
id: img_meta
with:
flavor: |
latest=auto
suffix=${{ steps.flavor.outputs.name }}
images: ghcr.io/${{ github.repository }}-sshd-tunnel
tags: |
type=sha,format=short,prefix=commit-
type=raw,value=latest
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
context: ./
push: true
tags: ${{ steps.img_meta.outputs.tags }}
labels: ${{ steps.img_meta.outputs.labels }}