Skip to content

add docker hub push ci #15

add docker hub push ci

add docker hub push ci #15

Workflow file for this run

name: Push Docker image to Github Packages (GHCR)
on:
push:
branches:
- master
jobs:
GHCR-packaging:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t ghcr.io/sunny-unik/node-in-docker .
- name: Login to GitHub Container Registry
run: docker login ghcr.io -u Sunny-unik --password ${{ secrets.GITHUB_TOKEN }}
- name: Push Docker image to GHCR
run: docker push ghcr.io/sunny-unik/node-in-docker
docker-hub-packaging:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t sunnyunik/node-in-ubuntu:latest
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image to Docker Hub
run: docker push sunnyunik/node-in-ubuntu:latest