-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73e809f
commit 06e30f4
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |