|
@ -2,24 +2,44 @@ name: build |
|
|
|
|
|
|
|
|
on: |
|
|
on: |
|
|
push: |
|
|
push: |
|
|
paths: |
|
|
|
|
|
- ".github/workflows/build.yml" |
|
|
|
|
|
- 'Changes' |
|
|
|
|
|
|
|
|
push: |
|
|
|
|
|
branches: |
|
|
|
|
|
- master |
|
|
|
|
|
tags: |
|
|
|
|
|
- v* |
|
|
|
|
|
- latest |
|
|
|
|
|
|
|
|
jobs: |
|
|
jobs: |
|
|
build: |
|
|
build: |
|
|
runs-on: ubuntu-latest |
|
|
runs-on: ubuntu-latest |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/checkout@v2 |
|
|
- uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
- uses: crazy-max/ghaction-docker-buildx@v3 |
|
|
- uses: crazy-max/ghaction-docker-buildx@v3 |
|
|
with: |
|
|
with: |
|
|
buildx-version: v0.4.1 |
|
|
buildx-version: v0.4.1 |
|
|
- run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin |
|
|
|
|
|
- run: git submodule update --init |
|
|
|
|
|
- run: | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: update submodules |
|
|
|
|
|
run: git submodule update --init |
|
|
|
|
|
|
|
|
|
|
|
- name: login docker |
|
|
|
|
|
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin |
|
|
|
|
|
|
|
|
|
|
|
- name: build edge image |
|
|
|
|
|
if: github.ref == 'refs/heads/master' |
|
|
|
|
|
run: | |
|
|
docker buildx build \ |
|
|
docker buildx build \ |
|
|
--push \ |
|
|
--push \ |
|
|
--platform=linux/arm64,linux/amd64 \ |
|
|
--platform=linux/arm64,linux/amd64 \ |
|
|
-f=docker/alpine/Dockerfile \ |
|
|
-f=docker/alpine/Dockerfile \ |
|
|
-t=${{ github.repository }} \ |
|
|
|
|
|
|
|
|
-t=${{ github.repository }}:edge \ |
|
|
. |
|
|
. |
|
|
|
|
|
- name: build version image |
|
|
|
|
|
if: github.ref != 'refs/heads/master' |
|
|
|
|
|
run: | |
|
|
|
|
|
docker buildx build \ |
|
|
|
|
|
--push \ |
|
|
|
|
|
--platform=linux/arm64,linux/amd64 \ |
|
|
|
|
|
-f=docker/alpine/Dockerfile \ |
|
|
|
|
|
-t=${{ github.repository }}:$(echo ${{ github.ref }} | sed -E 's|refs/tags/||') \ |
|
|
|
|
|
. |