Skip to content

remove root user

remove root user #2

Workflow file for this run

name: Deploy to GitHub Container Registry
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # Required to push to GitHub Container Registry
steps:
# Checkout the code
- name: Checkout Code
uses: actions/checkout@v3
# Authenticate to GitHub Container Registry
- name: Log in to GitHub Container Registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
# Build and tag the Docker image
- name: Build and Tag Docker Image
run: |
docker build -t node-javascript-mysql-demo .
docker tag node-javascript-mysql-demo:latest ghcr.io/${{ github.repository_owner }}/node-javascript-mysql-demo:latest
# Push the Docker image to GHCR
- name: Push Docker Image to GitHub Container Registry
run: |
docker push ghcr.io/${{ github.repository_owner }}/node-javascript-mysql-demo:latest