This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
chore: Update from ubi8/nodejs-18-minimal:1-107 to ubi8/nodejs-18-min… #363
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Copyright (c) 2021-2022 Red Hat, Inc. | |
# This program and the accompanying materials are made | |
# available under the terms of the Eclipse Public License 2.0 | |
# which is available at https://www.eclipse.org/legal/epl-2.0/ | |
# | |
# SPDX-License-Identifier: EPL-2.0 | |
# | |
name: Next Build/Publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
next-build-publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Clone source code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Prepare | |
id: prep | |
run: | | |
set -e | |
SHORT_SHA1=$(git rev-parse --short HEAD) | |
echo "short_sha1=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
echo "version=next" >> $GITHUB_OUTPUT | |
echo "image=che-devfile-registry" >> $GITHUB_OUTPUT | |
echo "platforms=$(cat PLATFORMS)" >> $GITHUB_OUTPUT | |
- name: "Set up QEMU" | |
uses: docker/setup-qemu-action@v3 | |
- name: "Set up Docker Buildx" | |
uses: docker/setup-buildx-action@v3 | |
- name: "Login to quay.io" | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Login to docker.io | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Build and push happy path image | |
run: ./happy-path/build_happy_path_image.sh --push --rm | |
env: | |
TAG: next | |
- name: "Build and push" | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./build/dockerfiles/Dockerfile | |
platforms: ${{ steps.package.outputs.content }} | |
tags: quay.io/eclipse/${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.version }},quay.io/eclipse/${{ steps.prep.outputs.image }}:${{ steps.prep.outputs.short_sha1 }} | |
push: true | |
- name: Set up yq | |
run: | | |
sudo wget https://github.com/mikefarah/yq/releases/download/v4.7.0/yq_linux_amd64 -O /usr/bin/yq | |
sudo chmod +x /usr/bin/yq | |
- name: Generate devfiles with registryUrls and publish to GH pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.CHE_BOT_GITHUB_TOKEN }} | |
VERSION: main | |
run: ./.ci/generate_and_publish_registry_url_devfiles.sh |