Add Dockerfile for initial ramdisk environment #1
Workflow file for this run
This file contains hidden or 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
| name: Build Initrd Base Image | |
| on: | |
| push: | |
| paths: | |
| - 'lib/system/alpine-initrd/Dockerfile' | |
| - '.github/workflows/build-initrd-image.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get short SHA | |
| id: sha | |
| run: echo "short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_PASSWORD }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./lib/system/alpine-initrd | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ secrets.DOCKERHUB_USERNAME }}/hypeman-initrd:${{ steps.sha.outputs.short }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |