Skip to content

chore: removed hardcoded username #2

chore: removed hardcoded username

chore: removed hardcoded username #2

Workflow file for this run

name: Build and Push Docker Images
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/nginx-secure:${{ github.sha }}
${{ secrets.DOCKERHUB_USERNAME }}/nginx-secure:latest