Skip to content

Merge pull request #2 from screepers/renovate/docker-build-push-actio… #9

Merge pull request #2 from screepers/renovate/docker-build-push-actio…

Merge pull request #2 from screepers/renovate/docker-build-push-actio… #9

Workflow file for this run

name: Deploy Images to GHCR
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
on:
push:
branches:
- main
workflow_dispatch:
jobs:
push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
defaults:
run:
working-directory: './Store'
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@3d58c274f17dffee475a5520cbe67f0a882c4dbb
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@94d76d3bc1409736cb5dc1ada9502bec3a72973c
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}