1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00
Files
libssh2/.github/workflows/openssh_server.yml
Viktor Szakats 455f062236 GHA: run fuzzer on master commits, bump upload-artifacts
Also adjust formatting to match curl workflows.

Closes #1736
2025-10-25 00:51:35 +02:00

84 lines
3.2 KiB
YAML

# Copyright (C) Marc Hoersken
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# SPDX-License-Identifier: BSD-3-Clause
name: 'OpenSSH Server Docker Image'
'on':
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true
permissions: {}
jobs:
build-and-push:
name: 'Image build and push'
runs-on: ubuntu-latest
permissions:
contents: read # To comply with https://docs.github.com/en/actions/tutorials/publish-packages/publish-docker-images
packages: write # To create/update container
steps:
- uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- shell: bash
id: hash
run: echo "hash=$(git rev-parse --short=20 HEAD:tests/openssh_server)" >> "$GITHUB_OUTPUT"
- shell: bash
id: poll
continue-on-error: true
env:
HASH: '${{ steps.hash.outputs.hash }}'
run: docker manifest inspect "ghcr.io/${GITHUB_REPOSITORY_OWNER}/ci_tests_openssh_server:${HASH}"
- uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
if: ${{ steps.poll.outcome == 'failure' }}
id: meta
with:
images: ghcr.io/${{ github.repository_owner }}/ci_tests_openssh_server
tags: |
type=raw,value=${{ steps.hash.outputs.hash }}
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
if: ${{ steps.poll.outcome == 'failure' }}
with:
context: ./tests/openssh_server
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}