Skip to content

Demo location to be updated #15

Demo location to be updated

Demo location to be updated #15

Workflow file for this run

name: Build and Push to Docker Hub
on:
push:
branches:
- 'main'
jobs:
build-and-push-to-dockerhub:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: |
docker build . -t ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:${{ github.sha }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:${{ github.sha }} ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:${{ github.sha }}
docker push ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:latest
echo '----------------------------------------'
docker inspect --format '
ID: {{.Id}}
RepoTags: {{.RepoTags}}
RepoDigests: {{.RepoDigests}}
Created: {{.Created}}
Architecture: {{.Architecture}}
OS: {{.Os}}
Size: {{.Size}}
Metadata: {{.Metadata}}
Author: {{ index .Config.Labels "org.opencontainers.image.authors" }}
' ${{ secrets.DOCKERHUB_USERNAME }}/ssl-checker-webapp:latest
echo '----------------------------------------'