chore: fix github action

This commit is contained in:
Victor Martinez 2024-01-21 22:37:48 +01:00
commit fa6d407d45

View file

@ -2,9 +2,9 @@ name: Publish Docker image
on:
push:
branches: [ "main" ]
branches: ["main"]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
tags: ["v*.*.*"]
jobs:
push_to_registry:
@ -14,20 +14,28 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v2
# Set up BuildKit Docker container builder to be able to build
# multi-platform images and export cache
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@latest
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@latest
uses: docker/metadata-action@v5
with:
images: jasterv/my-website
- name: Build and push Docker image
uses: docker/build-push-action@latest
uses: docker/build-push-action@v5
with:
context: .
push: true