feat(ci): Add pipeline to build images
All checks were successful
Image builder / build (push) Successful in 23s

This commit is contained in:
Tanguy Herbron 2023-08-07 11:23:20 +02:00
parent 2794c011f4
commit edbc99f732
2 changed files with 2 additions and 15 deletions

View File

@ -13,22 +13,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Start shell build
run: CONTAINER_TOKEN=${{ secrets.CONTAINER_TOKEN }} ./build.sh
- name: Generate tag
id: tag_vars
run: echo "IMAGE_NAME=$(echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)" >> $GITHUB_OUTPUT
- name: Login to register - name: Login to register
uses: https://gitea.com/docker/login-action@v2 uses: https://gitea.com/docker/login-action@v2
with: with:
registry: https://git.halis.io registry: https://git.halis.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_TOKEN }} password: ${{ secrets.CONTAINER_TOKEN }}
- name: Build and push - name: Start shell build
uses: https://github.com/docker/build-push-action@v4 run: ./build.sh
with:
push: true
file: images/debian/Dockerfile.12.1-node18
tags: git.halis.io/athens-school/runner-images:debian12.1-node18

View File

@ -1,11 +1,9 @@
#!/bin/sh #!/bin/sh
echo $CONTAINER_TOKEN | docker login git.halis.io -u $GITHUB_ACTOR --password-stdin
IMAGE_NAME=$(echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-) IMAGE_NAME=$(echo $GITHUB_SERVER_URL/$GITHUB_REPOSITORY | tr '[:upper:]' '[:lower:]' | cut -d '/' -f3-)
for d in ./images/* for d in ./images/*
do do
echo "Loading $d"
for i in $d/* for i in $d/*
do do
echo "Building $i" echo "Building $i"