Skip to content

Commit cc1e555

Browse files
authored
Merge pull request #42 from e0ne/add-image-publish-workflow
Add GitHub workflows to publish imeges per release
2 parents f8db767 + 3c992e0 commit cc1e555

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed

.github/workflows/release-ubi.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Publish UBI Docker image
7+
8+
on:
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
push_to_registry:
14+
name: Push Docker image to Docker Hub
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v2
19+
20+
- name: Log in to Docker Hub
21+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
22+
with:
23+
username: ${{ secrets.DOCKER_USERNAME }}
24+
password: ${{ secrets.DOCKER_PASSWORD }}
25+
26+
- name: Extract metadata (tags, labels) for Docker
27+
id: meta
28+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
29+
with:
30+
images: mellanox/k8s-rdma-shared-dev-plugin-ubi
31+
32+
- name: Build and push UBI Docker image
33+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
34+
with:
35+
context: .
36+
push: true
37+
file: Dockerfile.ubi
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/release.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Publish Docker image
7+
8+
on:
9+
release:
10+
types: [published]
11+
12+
jobs:
13+
push_to_registry:
14+
name: Push Docker image to Docker Hub
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out the repo
18+
uses: actions/checkout@v2
19+
20+
- name: Log in to Docker Hub
21+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
22+
with:
23+
username: ${{ secrets.DOCKER_USERNAME }}
24+
password: ${{ secrets.DOCKER_PASSWORD }}
25+
26+
- name: Extract metadata (tags, labels) for Docker
27+
id: meta
28+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
29+
with:
30+
images: mellanox/k8s-rdma-shared-dev-plugin
31+
32+
- name: Build and push Docker image
33+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
34+
with:
35+
context: .
36+
push: true
37+
file: Dockerfile.ubi
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)