Skip to content

Commit

Permalink
chore(IDX): create minimal image
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundy committed Jul 30, 2024
1 parent 962bb38 commit 9b3b3bb
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/minimal-runner-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ubuntu:20.04

RUN apt -yq update && \
apt -yq install --no-install-recommends git curl wget

CMD ["/bin/bash"]
1 change: 1 addition & 0 deletions .github/minimal-runner-image/TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1
39 changes: 39 additions & 0 deletions .github/workflows/build-minimal-runner-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Minimal Runner Image

on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/build-minimal-runner-image.yml'
- '.github/minimal-runner-image/**'

jobs:
build-and-upload-minimal-image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@a530e948adbeb357dbca95a7f8845d385edf4438 # v3

- name: Login to GHCR
uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Determine TAG
id: tag
run: |
echo "TAG=$(cat ${{ github.workspace }}/.github/minimal-runner-image/TAG)" >> $GITHUB_ENV
- name: Build and push image
uses: docker/build-push-action@eb539f44b153603ccbfbd98e2ab9d4d0dcaf23a4 # v5
with:
context: ${{ github.workspace}}${{inputs.context }}
push: true
tags: |
ghcr.io/${{ inputs.org }}/${{ inputs.image-name }}:${{ env.TAG }}
ghcr.io/${{ inputs.org }}/${{ inputs.image-name }}:latest

0 comments on commit 9b3b3bb

Please sign in to comment.