Skip to content

Force new build with correct tag #4

Force new build with correct tag

Force new build with correct tag #4

name: Nodejs CD to Docker Hub
on:
push:
branches: [ "main" ]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout kode
uses: actions/checkout@v4
# 1. Login ke Docker Hub menggunakan Secrets yang tadi dibuat
- name: Login ke Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# 2. Build dan Push otomatis
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
# Ganti 'usernameanda' dengan username Docker Hub Anda yang asli
tags: sug1anto/nodejs1b:latest