feature request: Webhook to notify on status #112
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: Build PR images | |
on: | |
issue_comment: | |
types: | |
- created | |
jobs: | |
publish-registry-pr: | |
if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- spark_version: 3.4.3 | |
hadoop_version: 3 | |
- spark_version: 3.5.2 | |
hadoop_version: 3 | |
steps: | |
- name: Checkout pull request | |
uses: actions/checkout@v3 | |
with: | |
ref: refs/pull/${{ github.event.issue.number }}/head | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
build-args: | | |
SPARK_VERSION=${{ matrix.spark_version }} | |
HADOOP_VERSION=${{ matrix.hadoop_version }} | |
tags: ghcr.io/exacaster/lighter:${{ github.event.issue.number }}-spark${{ matrix.spark_version }} | |
- name: Comment PR with Docker Image URL | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
issue-number: ${{ github.event.issue.number }} | |
body: | | |
Docker image has been built and pushed. | |
Image URL: ghcr.io/exacaster/lighter:${{ github.event.issue.number }}-spark${{ matrix.spark_version }} | |
token: ${{ github.token }} |