-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (26 loc) · 932 Bytes
/
Copy pathdocker-publish.yml
File metadata and controls
31 lines (26 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Docker Image CI
on:
push:
branches: [ "**" ] # Triggers the workflow on push events to all branches
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }} # Your Docker Hub username
password: ${{ secrets.DOCKERHUB_PASSWORD }} # Your Docker Hub token stored as a secret
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: meysam57/networkinfrastructureweb:latest # Replace with your Docker Hub username and desired image name/tag