Build Instana python-sensor-test-py3.14.0 #4
This file contains hidden or 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
# This workflow builds a container image on top of the Python 3.14.0 RC images | |
# with all dependencies already compiled and installed to be used in the tests | |
# CI pipelines. | |
name: Build Instana python-sensor-test-py3.14.0 | |
on: | |
workflow_dispatch: # Manual trigger. | |
schedule: | |
- cron: '1 0 * * 1,3' # Every Monday and Wednesday at midnight and one. | |
env: | |
IMAGE_NAME: python-sensor-test-py3.14.0 | |
IMAGE_TAG: latest | |
CONTAINER_FILE: ./Dockerfile-py3140 | |
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
REGISTRY_USER: ${{ github.actor }} | |
REGISTRY_PASSWORD: ${{ github.token }} | |
jobs: | |
build-and-push: | |
name: Build container image. | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build image | |
id: build_image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
image: ${{ env.IMAGE_NAME }} | |
tags: ${{ env.IMAGE_TAG }} | |
containerfiles: ${{ env.CONTAINER_FILE }} | |
- name: Echo Outputs | |
run: | | |
echo "Image: ${{ steps.build_image.outputs.image }}" | |
echo "Tags: ${{ steps.build_image.outputs.tags }}" | |
echo "Tagged Image: ${{ steps.build_image.outputs.image-with-tag }}" | |
- name: Check images created | |
run: buildah images | grep '${{ env.IMAGE_NAME }}' | |
# Push the image to GHCR (Image Registry) | |
- name: Push To GHCR | |
uses: redhat-actions/push-to-registry@v2 | |
id: push-to-ghcr | |
with: | |
image: ${{ steps.build_image.outputs.image }} | |
tags: ${{ steps.build_image.outputs.tags }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
extra-args: | | |
--disable-content-trust | |
- name: Print image URL | |
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}" |