Skip to content

Commit

Permalink
Merge pull request #353 from bcgov/feature/github-action-to-build-vit…
Browse files Browse the repository at this point in the history
…e-app

Add GitHub Actions workflow job for building and pushing Vite app
  • Loading branch information
ty2k authored May 17, 2024
2 parents 4c8be8e + acf9e81 commit 92b7288
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,31 @@ jobs:
run: |
docker tag design-system-react-components-storybook:latest image-registry.apps.silver.devops.gov.bc.ca/${{ secrets.OPENSHIFT_SILVER_LICENSE_PLATE }}-tools/design-system-react-components-storybook:develop
docker push image-registry.apps.silver.devops.gov.bc.ca/${{ secrets.OPENSHIFT_SILVER_LICENSE_PLATE }}-tools/design-system-react-components-storybook --all-tags
vite-build-and-push:
name: Vite build and push
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build image with docker build
run: docker build ./packages/react-components/ -f ./packages/react-components/Dockerfile.vite -t design-system-react-components-vite:latest

- name: Login to OpenShift Silver image registry
uses: docker/login-action@v3
with:
registry: image-registry.apps.silver.devops.gov.bc.ca
username: ${{ secrets.OPENSHIFT_SILVER_SERVICEACCOUNT_USERNAME }}
password: ${{ secrets.OPENSHIFT_SILVER_SERVICEACCOUNT_PASSWORD }}

- name: Tag and push Docker image
run: |
docker tag design-system-react-components-vite:latest image-registry.apps.silver.devops.gov.bc.ca/${{ secrets.OPENSHIFT_SILVER_LICENSE_PLATE }}-tools/design-system-react-components-vite:develop
docker push image-registry.apps.silver.devops.gov.bc.ca/${{ secrets.OPENSHIFT_SILVER_LICENSE_PLATE }}-tools/design-system-react-components-vite --all-tags

0 comments on commit 92b7288

Please sign in to comment.