-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (33 loc) · 1.03 KB
/
build-and-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Push image to ghcr.io
on:
push:
tags: ["v*"]
workflow_dispatch:
permissions:
packages: write
contents: read # This is required for actions/checkout
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Workaround for running out of disk space
run: |
sudo rm -rf /var/lib/docker/tmp
sudo mkdir -p /mnt/tmp
sudo ln -s /mnt/tmp /var/lib/docker/tmp
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
provenance: false
tags: ghcr.io/${{ github.actor }}/zephyr-ready:${{ github.event_name == 'workflow_dispatch' && 'latest' || github.ref_name }}
- run: sudo du /mnt