Skip to content

fix(SSH): Fixed ssh key issue #3

fix(SSH): Fixed ssh key issue

fix(SSH): Fixed ssh key issue #3

name: "Build and release ssh docker-gateway"
on:
push:
branches:
- main
- develop
paths:
- "gateway_container/Dockerfile"
- "gateway_container/entrypoint.sh"
- ".github/workflows/release-gateway.yml"
workflow_dispatch:
jobs:
build-gateway:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SetUp QEMU
uses: docker/setup-qemu-action@v3
- 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: Build temporal authorised keys
run: |
echo "${{ secrets.VALIDATION_MANAGER_KEY }}" > gateway_container/authorized_keys
echo "${{ secrets.VALIDATION_PUB_KEY }}" > gateway_container/authorized_keys
echo "${{ secrets.VALIDATION_ADMIN_PUB_KEY }}" >> gateway_container/authorized_keys
- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./gateway_container/
file: ./gateway_container/Dockerfile
platforms: linux/amd64,linux/arm64/v8
build-args: |
GIT_BRANCH=${{ github.head_ref || github.ref_name }}
GIT_BUILD_TIME=${{ env.BUILD_TIME }}
GIT_COMMIT_ID=${{ github.sha }}
GITHUB_RUN_NUMBER=${{ github.run_number }}
GITHUB_RUN_ID=${{ github.run_id }}
PROJECT_URL=${{ github.server_url }}/${{ github.repository }}
push: true
tags: >
ghcr.io/nuvlaedge/docker_gateway:latest
cache-from: type=gha
cache-to: type=gha,mode=max