feat(Images): Initial commit for building ubuntu image with i915 supp… #6
Workflow file for this run
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
name: Build and Push Docker Image with Git Tag | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin | |
- name: Extract tag name | |
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV | |
- name: Build and push Docker image | |
run: | | |
dist="ubuntu-hw" | |
if [ -n "$TAG_NAME" ]; then | |
docker build -t ghcr.io/${{ github.repository_owner }}/$dist:$TAG_NAME "./images/$dist" | |
docker push ghcr.io/${{ github.repository }}:$tag | |
else | |
echo "Skipping - tag name not found." | |
fi | |
env: | |
TAG_NAME: ${{ env.TAG_NAME }} | |