mirror of
https://github.com/N0rthernL1ghts/bbk-docker.git
synced 2024-11-27 06:10:40 +01:00
Add build workflow
This commit is contained in:
parent
fda4e4c019
commit
48f32f40f3
35
.github/workflows/image.yml
vendored
Normal file
35
.github/workflows/image.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
name: Build docker WordPress image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v2
|
||||||
|
id: cache
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
with:
|
||||||
|
config-inline: |
|
||||||
|
[worker.oci]
|
||||||
|
max-parallelism = 16
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
- name: Build image
|
||||||
|
run: build/bin/build
|
3
build/bin/build
Executable file
3
build/bin/build
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
docker buildx bake --push --file build/docker-bake.hcl
|
23
build/docker-bake.hcl
Normal file
23
build/docker-bake.hcl
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
group "default" {
|
||||||
|
targets = ["1_0"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "build-dockerfile" {
|
||||||
|
dockerfile = "Dockerfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
target "build-platforms" {
|
||||||
|
platforms = ["linux/amd64"]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "build-common" {
|
||||||
|
pull = true
|
||||||
|
}
|
||||||
|
|
||||||
|
target "1_0" {
|
||||||
|
inherits = ["build-dockerfile", "build-platforms", "build-common"]
|
||||||
|
tags = ["docker.io/nlss/bbk-cli:1", "docker.io/nlss/bbk-cli:1.0", "docker.io/nlss/bbk-cli:latest"]
|
||||||
|
args = {
|
||||||
|
BBKCLI_VERSION = "1.0"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user