Skip to content

Commit

Permalink
Publish container to ghcr.io
Browse files Browse the repository at this point in the history
Remove arch linux armv7/v8 docker containers.
  • Loading branch information
dbast committed Dec 26, 2023
1 parent f7181a0 commit 01f1629
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 359 deletions.
57 changes: 0 additions & 57 deletions .github/workflows/archlinuxarm-armv7-docker.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/archlinuxarm-armv8-docker.yml

This file was deleted.

92 changes: 40 additions & 52 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker:
runs-on: ubuntu-latest
Expand All @@ -34,27 +38,27 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

#- name: Docker meta
# id: meta
# uses: docker/metadata-action@v5
# with:
# images: |
# mkaczanowski/packer-builder-arm
# tags: |
# type=ref,event=branch
# type=ref,event=pr
# type=match,pattern=v(.*),group=1
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=match,pattern=v(.*),group=1
#### build+export, test only on PRs
#- name: Build and export to Docker
# if: github.event_name == 'pull_request'
# uses: docker/build-push-action@v5
# with:
# context: .
# file: docker/Dockerfile
# load: true
# tags: packer-plugin-cross:test
# labels: ${{ steps.meta.outputs.labels }}
### build+export, test only on PRs
- name: Build and export to Docker
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
file: docker/Dockerfile
load: true
tags: packer-plugin-cross:test
labels: ${{ steps.meta.outputs.labels }}

- name: Install packer plugins
if: github.event_name == 'pull_request'
Expand All @@ -69,36 +73,20 @@ jobs:
du -h --apparent-size raspberry-pi-4.img
####

# - name: Login to DockerHub
# uses: docker/login-action@v3
# if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
# with:
# username: ${{ secrets.DOCKER_USER }}
# password: ${{ secrets.DOCKER_PASSWORD }}

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GHCR_IO_REGISTRY_TOKEN }}

#- name: Build and push
# uses: docker/build-push-action@v5
# if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') }}
# with:
# context: .
# file: docker/Dockerfile
# platforms: linux/amd64,linux/arm64
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

#- name: Update description
# uses: peter-evans/dockerhub-description@v3
# if: github.ref == 'refs/heads/master'
# with:
# username: ${{ secrets.DOCKER_USER }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# short-description: Packer plugin to build ARM images
# readme-filepath: ./README.md
- name: Build and push
uses: docker/build-push-action@v5
if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') }}
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
38 changes: 0 additions & 38 deletions boards/armv7/alpine.json

This file was deleted.

76 changes: 0 additions & 76 deletions boards/armv7/archlinuxarm-docker.pkr.hcl

This file was deleted.

Loading

0 comments on commit 01f1629

Please sign in to comment.