Skip to content

Commit

Permalink
Merge pull request #20 from elixir-europe/main
Browse files Browse the repository at this point in the history
Pull request image UI
  • Loading branch information
Gemma Milla authored Nov 29, 2023
2 parents 095768b + 56b64bc commit 04cb2a3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
.gitignore
LICENSE
README.md
deploy/db
tests
node_modules
frontend/node_modules
frontend2/node_modules
.yarn
43 changes: 43 additions & 0 deletions .github/workflows/push_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create and publish a Docker image

on:
push:
branches: ['elixir-bsc', 'main']
tags:
- 'v*.*.*'
pull_request:
branches: ['elixir-bsc', 'main']
tags:
- 'v*.*.*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
# Indicates that the Docker build context is the current directory.
# Otherwise, it would be a Git URL (doing a separate clean checkout).
context: ./frontend
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 04cb2a3

Please sign in to comment.