From 0dd144d852d88a9dd1df87cbb04d43a7d795184a Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Sat, 6 Jan 2024 11:46:02 -0800 Subject: [PATCH 1/2] deploy: also deploy to ghcr.io; SPDX license * Change to SPDX-License-Identifier * Enable deploying to ghcr.io Signed-off-by: Tim Orling --- deploy.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/deploy.sh b/deploy.sh index 4df47f5..c1b55f0 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,18 +1,8 @@ #!/bin/bash # Copyright (C) 2016 Intel Corporation +# Copyright (C) 2024 Konsulko Group # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0-only # # This script is meant to be consumed by travis. It's very simple but running # a loop in travis.yml isn't a great thing. @@ -33,6 +23,15 @@ if ([ "${GITHUB_EVENT_NAME}" = "push" ] || [ "${GITHUB_EVENT_NAME}" = "workflow_ ${ENGINE_CMD} tag ${REPO}:${BASE_DISTRO} ${REPO}:latest ${ENGINE_CMD} push ${REPO}:latest fi + + echo $GHCR_PASSWORD | ${ENGINE_CMD} login ghcr.io -u $GHCR_USERNAME --password-stdin + ${ENGINE_CMD} push ghcr.io/${REPO}:${BASE_DISTRO} + + if [ "${DEFAULT_DISTRO}" = "${BASE_DISTRO}" ]; then + ${ENGINE_CMD} tag ${REPO}:${BASE_DISTRO} ghcr.io/${REPO}:latest + ${ENGINE_CMD} push ghcr.io/${REPO}:latest + fi + else echo "Not pushing since build was triggered by a pull request." fi From e352fc96608e628ac5b6654d63e3a17c3ee50b02 Mon Sep 17 00:00:00 2001 From: Tim Orling Date: Sat, 6 Jan 2024 11:47:04 -0800 Subject: [PATCH 2/2] workflows: bump to checkout v4 Bump to latest actions/checkout@v4 Signed-off-by: Tim Orling --- .github/workflows/build-test-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-deploy.yml b/.github/workflows/build-test-deploy.yml index 0c1bd06..c18e4bb 100644 --- a/.github/workflows/build-test-deploy.yml +++ b/.github/workflows/build-test-deploy.yml @@ -38,7 +38,7 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Build and test the images - name: Run build-and-test.sh