-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f880a15
commit 7d4e029
Showing
2 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and Push Image | ||
on: | ||
release: | ||
types: [released] | ||
|
||
jobs: | ||
build: | ||
name: Build and push image | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build Image of PostgreSQL-Backup-Zen | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: rezachalak/bzen-pg | ||
tags: latest ${{ github.sha }} ${{ github.event.release.tag_name }} | ||
dockerfiles: | | ||
./docker/pg/Dockerfile | ||
- name: Build Image of MongoDB-Backup-Zen | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: rezachalak/bzen-mongo | ||
tags: latest ${{ github.sha }} ${{ github.event.release.tag_name }} | ||
dockerfiles: | | ||
./docker/mongo/Dockerfile | ||
- name: Build Image of MySQL-Backup-Zen | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: rezachalak/bzen-mysql | ||
tags: latest ${{ github.sha }} ${{ github.event.release.tag_name }} | ||
dockerfiles: | | ||
./docker/mysql/Dockerfile | ||
# Podman Login action (https://github.com/redhat-actions/podman-login) also be used to log in, | ||
# in which case 'username' and 'password' can be omitted. | ||
- name: Push To dhub | ||
id: push-to-dhub | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: docker.io | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_PASSWORD }} | ||
|
||
- name: Print image url | ||
run: echo "Image pushed to ${{ steps.push-to-dhub.outputs.registry-paths }}" |