Skip to content

Commit

Permalink
try to fix raspberrypi build
Browse files Browse the repository at this point in the history
  • Loading branch information
oussama Dahmaz authored and oussama Dahmaz committed Aug 23, 2024
1 parent f3faf0b commit 4922278
Showing 1 changed file with 56 additions and 12 deletions.
68 changes: 56 additions & 12 deletions .github/workflows/docker-image-raspberrypi.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,65 @@
name: Docker Image RaspberryPI

on: push
on:
push:
branches:
- "**"
tags:
- "v*.*.*"

jobs:
rpi:
name : Generate for RaspberryPI
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.CONTAINER_GH_LOGIN }}
password: ${{ secrets.CONTAINER_GH_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/yadoms/build_for_raspberrypi
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
repository: yadoms/build_for_raspberrypi
tag_with_ref: true
path: build-raspberrypi

username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:build-raspberrypi"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 4922278

Please sign in to comment.