Action for ARM - 6
This commit is contained in:
parent
2fb4d9da42
commit
12b01cd97a
2 changed files with 7 additions and 69 deletions
68
.github/workflows/arm-docker-publish.yml
vendored
68
.github/workflows/arm-docker-publish.yml
vendored
|
|
@ -1,68 +0,0 @@
|
||||||
name: Build ARM image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "main" ]
|
|
||||||
# paths:
|
|
||||||
# - 'Dockerfile'
|
|
||||||
# - 'src/**'
|
|
||||||
pull_request:
|
|
||||||
branches: [ "main" ]
|
|
||||||
# paths:
|
|
||||||
# - 'Dockerfile'
|
|
||||||
# - 'src/**'
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: watchyourlan
|
|
||||||
TAGS: arm-latest, arm-v0.7.2
|
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Login to GHCR
|
|
||||||
# if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
# if: github.event_name != 'pull_request'
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta1 # you'll use this in the next step
|
|
||||||
uses: docker/metadata-action@v4
|
|
||||||
with:
|
|
||||||
# list of Docker images to use as base name for tags
|
|
||||||
images: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
|
|
||||||
# Docker tags based on the following events/attributes
|
|
||||||
tags: |
|
|
||||||
arm-latest
|
|
||||||
arm-v0.7.2
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
# platforms: linux/arm/v6,linux/arm/v7,linux/arm64
|
|
||||||
platforms: linux/arm/v7
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta1.outputs.tags }}
|
|
||||||
8
.github/workflows/docker-publish.yml
vendored
8
.github/workflows/docker-publish.yml
vendored
|
|
@ -14,7 +14,7 @@ on:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: watchyourlan
|
IMAGE_NAME: watchyourlan
|
||||||
TAGS: latest, v0.7.2
|
TAGS: latest, v0.7.3
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -25,9 +25,14 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Build and Push Docker Image to ghcr.io
|
- name: Build and Push Docker Image to ghcr.io
|
||||||
uses: mr-smithers-excellent/docker-build-push@v5
|
uses: mr-smithers-excellent/docker-build-push@v5
|
||||||
with:
|
with:
|
||||||
|
platform: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||||
image: ${{ env.IMAGE_NAME }}
|
image: ${{ env.IMAGE_NAME }}
|
||||||
tags: ${{ env.TAGS }}
|
tags: ${{ env.TAGS }}
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
|
|
@ -37,6 +42,7 @@ jobs:
|
||||||
- name: Build and Push Docker Image to docker.io
|
- name: Build and Push Docker Image to docker.io
|
||||||
uses: mr-smithers-excellent/docker-build-push@v5
|
uses: mr-smithers-excellent/docker-build-push@v5
|
||||||
with:
|
with:
|
||||||
|
platform: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64
|
||||||
image: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
|
image: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
|
||||||
tags: ${{ env.TAGS }}
|
tags: ${{ env.TAGS }}
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue