Skip to content

Commit

Permalink
Merge pull request #7 from VanillaViking/adv-docker-example
Browse files Browse the repository at this point in the history
Adv docker example
  • Loading branch information
RealVishy authored Oct 31, 2024
2 parents 66693fc + 9aacb5f commit da2a6c0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/docker-build-and-push.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and Push Docker Image

on:
push:
branches:
- adv-docker-example

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
tags: latest

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: "./solutions/hello-docker"
file: "./solutions/hello-docker/Dockerfile.production"
push: true
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit da2a6c0

Please sign in to comment.