Add pull_request GH workflow trigger to all workflows. (#177) #28
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
name: "clp-execution-image-build" | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/clp-execution-image-build.yaml" | |
- "components/core/tools/scripts/lib_install/*" | |
- "tools/docker-images/clp-execution-base-focal/**" | |
push: | |
paths: | |
- ".github/workflows/clp-execution-image-build.yaml" | |
- "components/core/tools/scripts/lib_install/*" | |
- "tools/docker-images/clp-execution-base-focal/**" | |
workflow_dispatch: | |
env: | |
CONTAINER_IMAGE_REGISTRY: ghcr.io | |
jobs: | |
build: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v3" | |
with: | |
submodules: "recursive" | |
- name: "Workaround actions/runner-images/issues/6775" | |
run: "chown $(id -u):$(id -g) -R ." | |
- uses: "docker/login-action@v3" | |
with: | |
registry: "${{env.CONTAINER_IMAGE_REGISTRY}}" | |
username: "${{github.actor}}" | |
password: "${{secrets.GITHUB_TOKEN}}" | |
- id: "meta" | |
uses: "docker/metadata-action@v5" | |
with: | |
images: >- | |
${{env.CONTAINER_IMAGE_REGISTRY}}/${{github.repository}}/clp-execution-x86-ubuntu-focal | |
- if: "github.event_name != 'pull_request' && github.ref == 'refs/heads/main'" | |
uses: "docker/build-push-action@v5" | |
with: | |
context: "./" | |
file: "./tools/docker-images/clp-execution-base-focal/Dockerfile" | |
push: true | |
tags: "${{steps.meta.outputs.tags}}" | |
labels: "${{steps.meta.outputs.labels}}" |