Skip to content

add badges to README #32

add badges to README

add badges to README #32

name: Docker build & test
on:
pull_request:
push:
branches: [main]
schedule:
- cron: '0 0 * * 1,2,3,4,5'
jobs:
build_docker_image:
name: "Call build and push action"
uses: ./.github/workflows/build-and-push-Docker-image.yml
secrets: inherit
permissions:
packages: write
contents: read
with:
image-name: ${{ github.event.repository.name }}
image-tag: |
${{
github.event_name == 'pull_request' && format('{0}{1}','pr', github.event.pull_request.number) ||
github.event_name == 'schedule' && 'nightly' ||
github.event_name == 'push' && github.ref_name ||
github.sha
}}
add_comment:
if: ${{ github.event_name == 'pull_request' }}
needs: build_docker_image
runs-on: ubuntu-latest
steps:
- name: Find Comment
# https://github.com/peter-evans/find-comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Docker image from this PR
- name: Create or update comment
# https://github.com/peter-evans/create-or-update-comment
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Docker image from this PR (${{ github.event.pull_request.head.sha }}) created
```
docker pull ${{ needs.build_docker_image.outputs.full-image-name }}
```
edit-mode: replace
build_private_docker_image:
name: "Build private docker image"
strategy:
# if one build or test fails, permit the others to run
fail-fast: false
# build images in parallel
matrix:
image-name:
- rmi_pacta_2023q4_pa2024ch
- rmi_pacta_2022q4_general
- rmi_pacta_2023q4_general
uses: ./.github/workflows/build-push-private.yml
secrets: inherit
with:
image-name: ${{ matrix.image-name }}