Skip to content

Commit 90c9495

Browse files
committed
feat: changed to pi imager
1 parent 1783abc commit 90c9495

1 file changed

Lines changed: 15 additions & 32 deletions

File tree

.github/workflows/dockerimage.yml

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,18 @@
1-
name: Docker Build/Publish Image
1+
name: My Pi Image
22
on:
33
push:
44
branches: [ main ]
5-
jobs:
6-
build:
7-
runs-on: ubuntu-18.04
8-
env:
9-
DOCKER_REGISTRY: kemansel.azurecr.io
10-
DOCKER_IMAGE: kmansel/express-me
11-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
12-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
13-
DOCKER_TARGET_PLATFORM: linux/arm/v7
14-
steps:
15-
- name: Checkout the code
16-
uses: actions/checkout@v1
17-
- name: Set up Docker Buildx
18-
uses: crazy-max/ghaction-docker-buildx@v1
19-
with:
20-
version: latest
21-
- name: Prepare
22-
if: success()
23-
id: prepare
24-
run: |
25-
echo ::set-output name=docker_platform::${DOCKER_TARGET_PLATFORM}
26-
echo ::set-output name=docker_image::${DOCKER_REGISTRY}/${DOCKER_IMAGE}
27-
echo ::set-output name=version::${GITHUB_RUN_NUMBER}
28-
- name: Docker Login
29-
if: success()
30-
run: |
31-
echo "${DOCKER_PASSWORD}" | docker login ${DOCKER_REGISTRY} --username "${DOCKER_USERNAME}" --password-stdin
32-
- name: Run Buildx (push image)
33-
if: success()
34-
run: |
35-
docker buildx build \ --platform ${{ steps.prepare.outputs.docker_platform }} \ --tag ${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }} \ --file ./Dockerfile \ --output type=image,push=true .
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: faddat/imager@v1
12+
- name: Shrink The Device Image
13+
run: sudo pishrink.sh -a -Z -v ubuntu-20.04.img
14+
- name: Upload artifacts
15+
uses: actions/upload-artifact@v2
16+
with:
17+
name: Your Pi Image
18+
path: ubuntu-20.04.img.xz

0 commit comments

Comments
 (0)