Skip to content

Bootstrap image

Bootstrap image #10

name: Bootstrap image
on:
workflow_dispatch:
inputs:
alias:
description: 'Docker image alias'
required: true
env:
IMAGE: ghcr.io/cscetbon/casskop-bootstrap:${{ github.event.inputs.alias }}
jobs:
build-publish-bootstrap-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: docker/bootstrap
tags: ghcr.io/cscetbon/casskop-bootstrap:${{ github.event.inputs.alias }}
- name: Run Dgoss Tests
run: |
curl -L https://raw.githubusercontent.com/aelsabbahy/goss/master/extras/dgoss/dgoss -o /usr/local/bin/dgoss
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.3.6/goss-linux-amd64 -o /usr/local/bin/goss
chmod +rx /usr/local/bin/dgoss /usr/local/bin/goss
export GOSS_PATH=/usr/local/bin/goss GOSS_FILES_STRATEGY=cp
IMAGE_TO_TEST=${{ env.IMAGE }} ./docker/bootstrap/dgoss/runChecks.sh
- name: Push Docker image
uses: docker/build-push-action@v4
with:
context: docker/bootstrap
tags: ${{ env.IMAGE }}
push: true