parent
a8d4b11132
commit
65b095c9b3
2 changed files with 6 additions and 25 deletions
|
@ -1,7 +1,7 @@
|
||||||
on: [push]
|
on: [push]
|
||||||
env:
|
env:
|
||||||
REGISTRY: forge.hornwitser.no
|
REGISTRY: forge.hornwitser.no
|
||||||
REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder
|
REGISTRY_IMAGE: forge.hornwitser.no/furnavia/builder:${{ github.ref_name }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -11,28 +11,16 @@ jobs:
|
||||||
name: Install buildah
|
name: Install buildah
|
||||||
run: |
|
run: |
|
||||||
apk add buildah
|
apk add buildah
|
||||||
-
|
|
||||||
name: Compute image tags
|
|
||||||
id: info
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
tee -a ${GITHUB_OUTPUT} <<EOF
|
|
||||||
TAGS=${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}
|
|
||||||
EOF
|
|
||||||
-
|
-
|
||||||
name: Checkout
|
name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
run: |
|
|
||||||
id
|
|
||||||
$GITHUB_WORKSPACE/builder.sh ${{ steps.info.outputs.TAGS }}
|
|
||||||
-
|
-
|
||||||
name: Authenticate with registry
|
name: Authenticate with registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_TOKEN }}" | buildah login ${{ env.REGISTRY }} --username "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
echo "${{ secrets.REGISTRY_TOKEN }}" | buildah login ${{ env.REGISTRY }} --username "${{ secrets.REGISTRY_USERNAME }}" --password-stdin
|
||||||
-
|
-
|
||||||
name: Push
|
name: Build and push
|
||||||
with:
|
run: |
|
||||||
push: true
|
id
|
||||||
tags: ${{ steps.info.outputs.TAGS }}
|
$GITHUB_WORKSPACE/builder.sh ${{ env.REGISTRY_IMAGE }}
|
||||||
|
buildah push ${{ env.REGISTRY_IMAGE }}
|
||||||
|
|
|
@ -34,13 +34,6 @@ buildah run $ctr -- corepack enable pnpm
|
||||||
buildah run $ctr rm -rf /var/lib/apt/lists/*
|
buildah run $ctr rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
buildah commit --rm $ctr $1
|
buildah commit --rm $ctr $1
|
||||||
if [[ $2 ]]; do
|
|
||||||
builda tag "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
for image in "$@"; do
|
|
||||||
buildah push $image
|
|
||||||
done
|
|
||||||
|
|
||||||
# apt-get install -y --no-install-recommends \
|
# apt-get install -y --no-install-recommends \
|
||||||
# ca-certificates \
|
# ca-certificates \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue