You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blog/.github/workflows/main.yml

15 lines
558 B
YAML

2 years ago
name: docker
3 years ago
on:
push:
branches: [ main ]
3 years ago
jobs:
build:
runs-on: ubuntu-latest
steps:
2 years ago
- uses: actions/checkout@v3
3 years ago
- name: Build the Docker image
run: |
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io
3 years ago
docker build . --file Dockerfile --tag docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/${{ secrets.DOCKER_HUB_REPOSITORY }}:latest
docker push docker.io/${{ secrets.DOCKER_HUB_USERNAME }}/${{ secrets.DOCKER_HUB_REPOSITORY }}:latest