Skip to content

Merge branch 'main' of github.com:FreaxMATE/EnergyTradingAnalysis #5

Merge branch 'main' of github.com:FreaxMATE/EnergyTradingAnalysis

Merge branch 'main' of github.com:FreaxMATE/EnergyTradingAnalysis #5

Workflow file for this run

name: Build and push Docker image
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Lowercase Repository Name
run: echo "REPO_LC=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: ghcr.io/${{ env.REPO_LC }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max