Skip to content

test: 🐛 Add debugging output for Meson setup exit code in build.sh #52

test: 🐛 Add debugging output for Meson setup exit code in build.sh

test: 🐛 Add debugging output for Meson setup exit code in build.sh #52

Workflow file for this run

name: Build Container Image & Test
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
# Publish semver tags as releases.
tags: ["v*.*.*"]
paths-ignore:
- "README.md"
branches: [ "**" ]
pull_request:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build_Container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}s
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build Docker image
id: buildandpush
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
push: false
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Add Environment Variables
id: env
run: |
echo "GH_PULLREQ_NUM=${{ github.event.number }}" >> $GITHUB_ENV
echo "GH_EEVENT_NAME=${{ github.event_name }}" >> $GITHUB_ENV
echo "GH_RREPOSITORY=${{ github.repository }}" >> $GITHUB_ENV
- name: Create Tar Image For Upload
id: tar
run: |
docker images
tag=$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ' ')
echo $tag
docker save -o image.tar $tag
- name: Upload Artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: image.tar
path: image.tar
retention-days: 1 # One Day (The Minimum)
outputs:
prnum: ${{ github.event.number }}
url: ${{ steps.upload.outputs.artifact-url }}
tag: ${{ env.IMAGE_NAME }}
artifact_id: ${{ steps.upload.outputs.artifact-id }}
Test_Action:
needs: Build_Container
uses: ./.github/workflows/test.yml
strategy:
fail-fast: true
matrix:
write_job_summary: [true, false]
repository: ["ZestCommunity/ZestCode"]
ref: ["main"]
caller_token: ["${{ github.token }}"]
with:
write_job_summary: ${{ matrix.write_job_summary }}
repository: ${{ matrix.repository }}
ref: ${{ matrix.ref }}
caller_token: ${{ matrix.caller_token }}
# permissions:
# contents: read
# packages: write
# needs:
# [
# Build_Container
# # test-action
# ]
# runs-on: ubuntu-latest
# if: ${{ github.event_name != 'pull_request' }}
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
# - name: Log into registry ${{ env.REGISTRY }}
# uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Download Image
# uses: actions/download-artifact@v4
# with:
# name: image.tar
# github-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Load Image
# id: load
# run: |
# echo "tag=$(docker load -i ./image.tar | grep -oP 'Loaded image: \K.*' | tr '\n' ' ')" > $GITHUB_OUTPUT
# - name: Push the image
# if: ${{ github.event_name != 'pull_request' }}
# run: |
# for tag in $(echo "${{ steps.load.outputs.tag }}" | tr ' ' '\n'); do
# echo "$tag"
# docker push "$tag"
# done