Skip to content

Docker workflow added #10

Docker workflow added

Docker workflow added #10

Workflow file for this run

name: Publish to npm
on:
push:
tags:
- "*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: Configure npm
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to npm
run: |
git config user.name "kshashikumar"
git config user.email "[email protected]"
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: Build Docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/mysql-gui:${{ github.ref_name }} .
docker tag ${{ secrets.DOCKER_USERNAME }}/mysql-gui:${{ github.ref_name }} ${{ secrets.DOCKER_USERNAME }}/mysql-gui:latest
- name: Push Docker image
run: |
docker push ${{ secrets.DOCKER_USERNAME }}/mysql-gui:${{ github.ref_name }}
docker push ${{ secrets.DOCKER_USERNAME }}/mysql-gui:latest