-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.45 KB
/
spark-history-server.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Build & Push Spark History Server Image
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- .github/workflows/spark-history-server.yml
- spark-history-server/**
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-push-image:
runs-on: ubuntu-latest
strategy:
matrix:
container: [spark-history-server]
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v2
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: image-names
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ matrix.container }}
tags: |
type=raw,value=latest,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
type=sha,format=long
- uses: docker/build-push-action@v5
with:
context: ${{ matrix.container }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
tags: ${{ steps.image-names.outputs.tags }}