Skip to content

Commit fc77e5e

Browse files
authored
Create main.yml
1 parent 79ab714 commit fc77e5e

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release and Publish
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
push_to_registry:
7+
name: Push Docker image to Docker Hub
8+
runs-on: ubuntu-latest
9+
steps:
10+
-
11+
name: Checkout
12+
uses: actions/checkout@v2
13+
-
14+
name: Docker meta
15+
id: docker_meta
16+
uses: crazy-max/ghaction-docker-meta@v1
17+
with:
18+
images: dmtf/redfish-mockup-creator
19+
tag-match-latest: false
20+
-
21+
name: Set up QEMU
22+
uses: docker/setup-qemu-action@v1
23+
-
24+
name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v1
26+
-
27+
name: Login to DockerHub
28+
uses: docker/login-action@v1
29+
with:
30+
username: ${{ secrets.DOCKER_USERNAME }}
31+
password: ${{ secrets.DOCKER_PASSWORD }}
32+
-
33+
name: Build and push
34+
id: docker_build
35+
uses: docker/build-push-action@v2
36+
with:
37+
push: true
38+
tags: ${{ steps.docker_meta.outputs.tags }}
39+
-
40+
name: Image digest
41+
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)