Skip to content

Commit

Permalink
feat(workflows): add workflow for deploying sshd image
Browse files Browse the repository at this point in the history
  • Loading branch information
ikr4-m committed Jul 24, 2024
1 parent 91181f7 commit e0f7eca
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-image-sshd_tunnel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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 }}

0 comments on commit e0f7eca

Please sign in to comment.