Ensure that vlc is installed #12
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
docker-build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and Push Multi-Architecture Images | |
run: | | |
repo_owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]') | |
for file in *.dockerfile; do | |
if [ -f "$file" ]; then | |
# Extract image name and tag | |
image_name=$(basename "$file" | sed -E 's/\.dockerfile//; s/-([^-]+)$/:\1/') | |
full_image_name="ghcr.io/$repo_owner/$image_name" | |
# Build and push for multiple architectures | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64 \ | |
-t $full_image_name \ | |
-f "$file" \ | |
--push . | |
fi | |
done |