Skip to content

Commit

Permalink
add workflows to build/push docker images to bcgovimages
Browse files Browse the repository at this point in the history
  • Loading branch information
patricksimonian committed Sep 17, 2021
1 parent 8eb2e5c commit f01174c
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/bc-mariadb-docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Backup Container Mongo - Docker Publish

on:
release:
types: [published, edited, released]


jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
# list of Docker images to use as base name for tags
images: |
bcgovimages/backup-container-mariadb
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: docker
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile_MariaDB
push: true
41 changes: 41 additions & 0 deletions .github/workflows/bc-mongo-docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Backup Container Mongo - Docker Publish

on:
release:
types: [published, edited, released]


jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
# list of Docker images to use as base name for tags
images: |
bcgovimages/backup-container-mongo
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: docker
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile_Mongo
push: true
41 changes: 41 additions & 0 deletions .github/workflows/bc-mssql-docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Backup Container Mongo - Docker Publish

on:
release:
types: [published, edited, released]


jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
# list of Docker images to use as base name for tags
images: |
bcgovimages/backup-container-mssql
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: docker
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile_MSSQL
push: true
41 changes: 41 additions & 0 deletions .github/workflows/bc-postgres-docker-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Backup Container Postgres - Docker Publish

on:
release:
types: [published, edited, released]


jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
# list of Docker images to use as base name for tags
images: |
bcgovimages/backup-container
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Push to Docker Hub
uses: docker/build-push-action@v2
with:
context: docker
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile
push: true

0 comments on commit f01174c

Please sign in to comment.