|
@ -2,15 +2,10 @@ name: Docker build on push |
|
|
env: |
|
|
env: |
|
|
DOCKER_CLI_EXPERIMENTAL: enabled |
|
|
DOCKER_CLI_EXPERIMENTAL: enabled |
|
|
|
|
|
|
|
|
# on: |
|
|
|
|
|
# push: |
|
|
|
|
|
# tags: |
|
|
|
|
|
# - '*' |
|
|
|
|
|
|
|
|
|
|
|
on: |
|
|
on: |
|
|
push: |
|
|
push: |
|
|
branches: |
|
|
tags: |
|
|
- master |
|
|
- '*' |
|
|
|
|
|
|
|
|
jobs: |
|
|
jobs: |
|
|
build: |
|
|
build: |
|
@ -47,14 +42,15 @@ jobs: |
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }} |
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }} |
|
|
restore-keys: | |
|
|
restore-keys: | |
|
|
${{ runner.os }}-buildx- |
|
|
${{ runner.os }}-buildx- |
|
|
- name: Show set env variables again |
|
|
- name: Test print env |
|
|
run: | |
|
|
run: | |
|
|
printf " HEAD_TAG: %s\n" "${{ env.HEAD_TAG }}" |
|
|
echo $RELEASE_TAG |
|
|
|
|
|
echo ${{ env.RELEASE_TAG }} |
|
|
- name: Run Docker buildx |
|
|
- name: Run Docker buildx |
|
|
run: | |
|
|
run: | |
|
|
docker buildx build \ |
|
|
docker buildx build \ |
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \ |
|
|
--cache-from "type=local,src=/tmp/.buildx-cache" \ |
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \ |
|
|
--cache-to "type=local,dest=/tmp/.buildx-cache" \ |
|
|
--platform linux/amd64,linux/arm64,linux/arm/v7 \ |
|
|
--platform linux/amd64,linux/arm64,linux/arm/v7 \ |
|
|
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:${{ env.HEAD_TAG }}" \ |
|
|
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-relay:${{ env.RELEASE_TAG }}" \ |
|
|
--output "type=registry" ./ |
|
|
--output "type=registry" ./ |
|
|