2021-05-17 07:45:27 +00:00
|
|
|
name: "Build Edge on Schedule"
|
2021-01-16 09:16:05 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 5"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
2021-01-16 14:34:31 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2021-01-16 09:16:05 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-08 22:57:01 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-01-16 09:16:05 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2021-09-28 10:37:54 +00:00
|
|
|
|
2021-01-25 12:42:33 +00:00
|
|
|
- name: Prepare tags
|
2021-01-16 09:16:05 +00:00
|
|
|
id: prep
|
2022-05-02 13:24:58 +00:00
|
|
|
uses: docker/metadata-action@v3.8.0
|
2021-01-25 12:42:33 +00:00
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
${{ secrets.DOCKER_REPOSITORY }}
|
|
|
|
${{ secrets.GHCR_REPOSITORY }}
|
2021-04-05 10:20:23 +00:00
|
|
|
tags: |
|
2021-05-17 07:45:27 +00:00
|
|
|
type=raw,value=edge
|
2021-09-28 10:37:54 +00:00
|
|
|
|
2021-01-16 09:16:05 +00:00
|
|
|
- name: Set up QEMU
|
2021-05-31 10:40:05 +00:00
|
|
|
uses: docker/setup-qemu-action@v1.2.0
|
2021-09-28 10:37:54 +00:00
|
|
|
|
2021-01-16 09:16:05 +00:00
|
|
|
- name: Set up Docker Buildx
|
2022-05-10 06:32:18 +00:00
|
|
|
uses: docker/setup-buildx-action@v2.0.0
|
2021-01-16 09:16:05 +00:00
|
|
|
id: buildx
|
2021-09-28 10:37:54 +00:00
|
|
|
|
2021-01-16 09:16:05 +00:00
|
|
|
- name: Login to DockerHub
|
2022-03-08 22:59:00 +00:00
|
|
|
uses: docker/login-action@v1.14.1
|
2021-01-16 09:16:05 +00:00
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2021-09-28 10:37:54 +00:00
|
|
|
|
2021-01-25 12:42:33 +00:00
|
|
|
- name: Login to GitHub Container Registry
|
2022-03-08 22:59:00 +00:00
|
|
|
uses: docker/login-action@v1.14.1
|
2021-01-25 12:42:33 +00:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
2021-05-12 10:31:37 +00:00
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2021-09-28 10:37:54 +00:00
|
|
|
|
2021-01-16 09:16:05 +00:00
|
|
|
- name: Build image locally
|
2022-05-10 06:43:00 +00:00
|
|
|
uses: docker/build-push-action@v3.0.0
|
2021-01-16 09:16:05 +00:00
|
|
|
with:
|
|
|
|
builder: ${{ steps.buildx.outputs.name }}
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
build-args: |
|
|
|
|
VCS_REF=${{ github.sha }}
|
|
|
|
VCS_VER=${{ github.ref }}
|
|
|
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
|
|
|
push: true
|
|
|
|
tags: ${{ steps.prep.outputs.tags }}
|