Skip to content

Commit 547e00d

Browse files
committed
ci: re build docker publish
1 parent 4f02c7a commit 547e00d

5 files changed

Lines changed: 69 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
name: Build docker image
1+
name: Build the docker image
2+
3+
permissions:
4+
contents: read
25

36
on: [push]
47

58
jobs:
69
build-action:
10+
name: Build the docker image
711
runs-on: ubuntu-latest
812
steps:
913
- name: Checkout repository
1014
uses: actions/checkout@v4
1115
- name: Build action image
1216
run: make docker-build
17+
env:
18+
PLATFORM: linux/amd64
19+
ACTION: load
20+
PROGRESS_MODE: plain

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and publish the docker image
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
tags:
9+
- "latest"
10+
11+
jobs:
12+
build-and-publish-action:
13+
name: Build and publish the docker image
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
# https://github.com/docker/setup-qemu-action
19+
- name: Set up QEMU
20+
uses: docker/setup-qemu-action@v3
21+
# https://github.com/docker/setup-buildx-action
22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
- name: Login to DockerHub
25+
uses: docker/login-action@v3
26+
with:
27+
registry: docker.io
28+
username: ${{ secrets.DOCKER_REPOSITORY_LOGIN }}
29+
password: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
30+
- name: Build action image
31+
run: make docker-build
32+
env:
33+
PLATFORM: linux/amd64,linux/arm/v6,linux/arm64/v8,linux/riscv64
34+
ACTION: push
35+
PROGRESS_MODE: plain
36+
IMAGE_TAG: botsudo/action-shellcheck

.github/workflows/shellcheck.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
name: run shellcheck
2+
3+
permissions:
4+
contents: read
5+
26
on: [push]
37

48
jobs:

Makefile

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
.PHONY: update-tags docker-build
22

3+
IMAGE_TAG ?= action-shellcheck
4+
5+
# All (built on the base image):
6+
# - linux/amd64
7+
# - linux/arm/v6
8+
# - linux/arm64/v8
9+
# - linux/riscv64
10+
PLATFORM ?= linux/amd64
11+
12+
ACTION ?= load
13+
PROGRESS_MODE ?= plain
14+
315
docker-build:
4-
docker build ./docker \
16+
# https://github.com/docker/buildx#building
17+
docker buildx build \
18+
--tag $(IMAGE_TAG) \
19+
--progress $(PROGRESS_MODE) \
20+
--platform $(PLATFORM) \
521
--build-arg VCS_REF=`git rev-parse HEAD` \
6-
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
22+
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
23+
--$(ACTION) \
24+
./docker
725

826
update-tags:
927
git checkout main

docker/hooks/build

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)