Skip to content

Commit

Permalink
Add asdf image
Browse files Browse the repository at this point in the history
  • Loading branch information
Taucher2003 committed Dec 8, 2023
1 parent 73e809f commit 06e30f4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build Image

on:
push:
branches:
- main
pull_request:

permissions:
packages: write

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- asdf

steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
image:
- '${{ matrix.image }}.Dockerfile'
- '${{ matrix.image }}/**'
- run: >-
docker build
-t ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}
-f ${{ matrix.image }}.Dockerfile
.
if: steps.filter.outputs.image == 'true'
- run: echo ${{ secrets.GITHUB_TOKEN }} | docker login -u $ --password-stdin ghcr.io
name: Login to registry
if: ${{ github.event_name == 'push' && steps.filter.outputs.image == 'true' }}
- run: docker push ghcr.io/${{ github.repository }}/${{ matrix.image }}:${{ github.run_number }}.${{ github.run_attempt }}
if: ${{ github.event_name == 'push' && steps.filter.outputs.image == 'true' }}
6 changes: 6 additions & 0 deletions asdf.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM debian:12.2-slim
LABEL org.opencontainers.image.source=https://github.com/code0-tech/build-images

RUN apt-get update && apt-get install curl git -y
RUN git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1
RUN echo "source $HOME/.asdf/asdf.sh" >> ~/.bashrc

0 comments on commit 06e30f4

Please sign in to comment.