Action test
This commit is contained in:
parent
75c116163e
commit
7bb804f1da
2 changed files with 64 additions and 0 deletions
63
.github/workflows/dev-arm-docker.yml
vendored
Normal file
63
.github/workflows/dev-arm-docker.yml
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
name: Docker-dev
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths:
|
||||||
|
- 'Dockerfile'
|
||||||
|
- '.version'
|
||||||
|
- 'src/**'
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths:
|
||||||
|
- 'Dockerfile'
|
||||||
|
- '.version'
|
||||||
|
- 'src/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: watchyourlan
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get version tag from env file
|
||||||
|
uses: c-py/action-dotenv-to-setenv@v2
|
||||||
|
with:
|
||||||
|
env-file: .version
|
||||||
|
|
||||||
|
- 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
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:dev
|
||||||
|
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:dev-${{ env.VERSION }}
|
||||||
|
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:dev
|
||||||
|
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:dev-${{ env.VERSION }}
|
||||||
1
.version
Normal file
1
.version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
VERSION=0.7.4
|
||||||
Loading…
Reference in a new issue