From e0f7eca50c72f9bf2b8dfc6bc05923ae3d1ce285 Mon Sep 17 00:00:00 2001 From: Ikramullah Date: Wed, 24 Jul 2024 09:44:28 +0700 Subject: [PATCH] feat(workflows): add workflow for deploying sshd image --- .github/workflows/build-image-sshd_tunnel.yml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build-image-sshd_tunnel.yml diff --git a/.github/workflows/build-image-sshd_tunnel.yml b/.github/workflows/build-image-sshd_tunnel.yml new file mode 100644 index 0000000..bf1bbdd --- /dev/null +++ b/.github/workflows/build-image-sshd_tunnel.yml @@ -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 }}