From 9a4c8bf323a2bc550958468e59fd3de79088f677 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Mon, 18 Dec 2023 12:51:36 +0100 Subject: [PATCH] ci: build-next --- .github/workflows/build-next.yaml | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/build-next.yaml diff --git a/.github/workflows/build-next.yaml b/.github/workflows/build-next.yaml new file mode 100644 index 0000000..686c312 --- /dev/null +++ b/.github/workflows/build-next.yaml @@ -0,0 +1,43 @@ +# +# Copyright (C) 2023 Red Hat, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + +name: CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + + - name: Login to ghcr.io + run: podman login --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} ghcr.io + + - name: Publish Image + id: publish-image + run: | + IMAGE_NAME=ghcr.io/${{ github.repository_owner }}/podman-desktop-extension-image-checker + IMAGE_LATEST=${IMAGE_NAME}:latest + IMAGE_SHA=${IMAGE_NAME}:${GITHUB_SHA} + ./scripts/build.sh ${IMAGE_NAME} ${GITHUB_SHA} + podman tag $IMAGE_SHA $IMAGE_LATEST + podman push $IMAGE_LATEST