Publish skupper-router main #739
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
# | |
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you 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. | |
# | |
name: Publish skupper-router main | |
on: | |
workflow_run: | |
workflows: ["Build"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
build-image: | |
name: Publish skupper-router image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check that container job from build workflow succeeded | |
run: | | |
curl -L \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${GITHUB_TOKEN}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
${{ github.event.workflow_run.jobs_url }} > jobs.json | |
conclusion=$(jq < jobs.json --raw-output '.jobs[] | select( .name == "Container image") | .conclusion') | |
echo ${conclusion} | |
[[ ${conclusion} == "success" ]] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- run: | | |
# build and publish the main image | |
# The version on main will be 0.0.0+<commit-sha>-main | |
export VERSION="0.0.0+${GITHUB_SHA}-main" | |
./.github/scripts/image.sh | |
env: | |
CONTAINER_USER: '${{ secrets.DOCKER_USER }}' | |
CONTAINER_PASSWORD: '${{ secrets.DOCKER_PASSWORD }}' |