Skip to content

Commit b939155

Browse files
authored
Add github actions to build and push operator image (#2)
1 parent e9cf8c7 commit b939155

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
on: [push, pull_request]
2+
name: Test
3+
jobs:
4+
ci:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Check out the repo
8+
uses: actions/checkout@v2
9+
- name: Build image
10+
run: make operator-image

.github/workflows/publish.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish Docker image
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
push_to_registry:
7+
name: Push Docker image to GitHub Packages
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Check out the repo
11+
uses: actions/checkout@v2
12+
- name: Prepare
13+
id: prep
14+
run: |
15+
DOCKER_IMAGE=ghcr.io/spotify/flink-operator:${GITHUB_SHA::8}
16+
echo ::set-output name=image::${DOCKER_IMAGE}
17+
- name: Login to Github container registry
18+
uses: docker/login-action@v1.1.1
19+
with:
20+
registry: ghcr.io
21+
username: ${{ github.repository_owner }}
22+
password: ${{ secrets.CR_PAT }}
23+
- name: Push image
24+
run: make operator-image push-operator-image
25+
env:
26+
IMG: ${{ steps.prep.outputs.image }}

0 commit comments

Comments
 (0)