feat : demo SPA added #1
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: Workflow Demo SPA | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
paths: | |
- '*' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Bump Version | |
default: v1.0.0 | |
required: true | |
jobs: | |
push_to_registry: | |
name: Push Docker image to Registries | |
env: | |
IMAGE_NAME: "workflow" | |
REGISTRY_NAMESPACE: ${{ secrets.REGISTRY_NAMESPACE }} | |
USERGROUP: ${{ secrets.USER_GROUP }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Inject slug/short variables | |
uses: rlespinasse/github-slug-action@v3.x | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Login to Quay.io | |
uses: docker/login-action@v1 | |
with: | |
registry: quay.io | |
username: ${{ secrets.CI_QUAY_USERNAME }} | |
password: ${{ secrets.CI_QUAY_TOKEN }} | |
- name: Build and push into repository | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: ${{ github.event_name != 'pull_request' }} | |
build-args: USERGROUP=${{secrets.USER_GROUP}} | |
tags: | | |
quay.io/${{ env.REGISTRY_NAMESPACE }}/${{ env.IMAGE_NAME }}:${{env.GITHUB_REF_SLUG}} | |
- name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |