Skip to content

Commit

Permalink
feature: add pipeline for publish docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Criado Marcos <[email protected]>
  • Loading branch information
javiercri committed Mar 24, 2022
1 parent d772aaa commit 06b66fb
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/build-workflow.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: build-workflow
# This workflow is triggered on pushes to the repository.
on: [push, pull_request]
on:
push:
branches:
- "*"
pull_request:

jobs:
build:
Expand Down Expand Up @@ -33,22 +37,3 @@ jobs:
run: |
cd charts
PATH=$PATH:/tmp/bin helm upgrade --install --set image.tag=v$GITHUB_SHA_SHORT --set rbac.create=true --wait --timeout 60s log-router ./log-router
publish:
name: publish-job
if: startsWith(github.ref, 'refs/heads/release')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: FranzDiebold/[email protected]
- name: docker-login
run: |
cd config-reloader && make docker-login
env: # Or as an environment variable
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: build-base
run: |
cd base-image && make build-image
- name: push-image
run: |
cd config-reloader && make push-image
28 changes: 28 additions & 0 deletions .github/workflows/release-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build-workflow
# This workflow is triggered on pushes to the repository.
on:
push:
tags:
- '*'

jobs:
publish:
name: publish-job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: FranzDiebold/[email protected]
- name: docker-login
run: |
cd config-reloader && make docker-login
env: # Or as an environment variable
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: build-base
run: |
cd base-image && make build-image
- name: push-image
run: |
cd config-reloader && make push-image
env:
TAG: ${{github.ref_name}}

0 comments on commit 06b66fb

Please sign in to comment.