ARM support (Issue #6)

This commit is contained in:
aceberg 2022-08-30 14:50:28 +07:00
parent d85906d653
commit f4a1d31ba3
2 changed files with 58 additions and 14 deletions

View file

@ -1,16 +1,16 @@
name: Build ARM image
name: Docker
on:
push:
branches: [ "main" ]
# paths:
# - 'Dockerfile'
# - 'src/**'
paths:
- 'Dockerfile'
- 'src/**'
pull_request:
branches: [ "main" ]
# paths:
# - 'Dockerfile'
# - 'src/**'
paths:
- 'Dockerfile'
- 'src/**'
env:
IMAGE_NAME: watchyourlan
@ -32,13 +32,13 @@ jobs:
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 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'

44
.github/workflows/ghcr-publish.yml vendored Normal file
View file

@ -0,0 +1,44 @@
name: Publish to ghcr.io
on:
push:
branches: [ "main" ]
paths:
- 'Dockerfile'
- 'src/**'
pull_request:
branches: [ "main" ]
paths:
- 'Dockerfile'
- 'src/**'
env:
IMAGE_NAME: watchyourlan
TAGS: latest, v0.7.3
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build and Push Docker Image to ghcr.io
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.TAGS }}
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Build and Push Docker Image to docker.io
# uses: mr-smithers-excellent/docker-build-push@v5
# with:
# image: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}
# tags: ${{ env.TAGS }}
# registry: docker.io
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}