Skip to content

Merge pull request #103 from LittleBigRefresh/dependabot/npm_and_yarn… #77

Merge pull request #103 from LittleBigRefresh/dependabot/npm_and_yarn…

Merge pull request #103 from LittleBigRefresh/dependabot/npm_and_yarn… #77

Workflow file for this run

name: Create Docker image
on:
push:
branches: ['main']
jobs:
build-and-push-image:
runs-on: ubuntu-latest
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# This step below will fill in things like name, description, etc. from the repository.
# It's helpful for us because it also fills in the version information automatically depending on how the job was invoked.
# See https://github.com/docker/metadata-action#basic
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/littlebigrefresh/refresh-web
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}