Merge pull request #98 from abhijeetgauravm/issuetemplate #208
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
name: Image Hub | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- master | |
jobs: | |
docker: | |
name: Docker build and push | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 1 | |
- name: Docker login | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | |
uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker build & push - envoy | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | |
run: | | |
cd rate-limit-filter && DOCKER_BUILDKIT=1 docker build --no-cache -t layer5/image-hub-envoy . | |
docker tag layer5/image-hub-envoy:latest layer5/image-hub-envoy:${GITHUB_SHA::8} | |
docker push layer5/image-hub-envoy:${GITHUB_SHA::8} | |
docker push layer5/image-hub-envoy:latest | |
- name: Docker build & push - api | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | |
run: | | |
cd api && DOCKER_BUILDKIT=1 docker build --no-cache -t layer5/image-hub-api . | |
docker tag layer5/image-hub-api:latest layer5/image-hub-api:${GITHUB_SHA::8} | |
docker push layer5/image-hub-api:${GITHUB_SHA::8} | |
docker push layer5/image-hub-api:latest | |
- name: Docker build & push - web | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master') && success() | |
run: | | |
cd web && DOCKER_BUILDKIT=1 docker build --no-cache -t layer5/image-hub-web . | |
docker tag layer5/image-hub-web:latest layer5/image-hub-web:${GITHUB_SHA::8} | |
docker push layer5/image-hub-web:${GITHUB_SHA::8} | |
docker push layer5/image-hub-web:latest |