Skip to content

refactor: update WSL compose files and remove deprecated configurations #60

refactor: update WSL compose files and remove deprecated configurations

refactor: update WSL compose files and remove deprecated configurations #60

name: Build and Publish Docker Image
env:
IMAGE_NAME: alexandrlucas/miro-docker
on:
schedule:
- cron: '15 19 * * 0'
push:
branches:
- "master"
- "dev"
tags:
- 'v*.*.*' # Use Semantic Versioning
pull_request:
branches:
- "master"
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable=${{ github.ref_name == 'master' }}
type=ref,event=tag
type=sha,enable=${{ github.ref_name == 'dev' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_BRANCH=${{ github.ref_name }}