Skip to content

Commit

Permalink
Pre-built docker image (#119)
Browse files Browse the repository at this point in the history
Signed-off-by: Galo Navarro <anglorvaroa@gmail.com>
  • Loading branch information
srvaroa authored Nov 21, 2023
1 parent 870758e commit 27b1a12
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release_dockerfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Create and publish a Docker image

on:
workflow_dispatch:
inputs:
release_tag:
description: 'Tag to publish'
required: true

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@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
run: |
docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.release_tag}} -f Dockerfile.release .
12 changes: 12 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM alpine:3.17.2

LABEL "com.github.actions.name"="Condition-based Pull Request labeller" \
"com.github.actions.description"="Automatically label pull requests based on rules" \
"com.github.actions.icon"="award" \
"com.github.actions.color"="blue" \
"maintainer"="Galo Navarro <anglorvaroa@gmail.com>" \
"repository"="https://github.com/srvaroa/labeler"

WORKDIR /
ADD action /action
ENTRYPOINT ["/action"]

0 comments on commit 27b1a12

Please sign in to comment.