Skip to content

Commit 8b9de1a

Browse files
just5kyJust5KY
andauthored
github actions for multi-arch builds (#35)
* Create dockerhub.yml * Update dockerhub.yml * Update dockerhub.yml * added docker username secret * Update dockerhub.yml * Update dockerhub.yml * switched tag to latest * renamed actions * Update dockerhub.yml * Update dockerhub.yml Co-authored-by: Just5KY <[email protected]>
1 parent 518c1cd commit 8b9de1a

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/dockerhub.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Main branch build & push
2+
3+
on:
4+
#schedule:
5+
# - cron: '50 15 * * *' #Change this to when you want automatic builds
6+
push:
7+
branches: [ main ]
8+
tags: [ 'v*.*.*' ]
9+
pull_request:
10+
branches: [ main ]
11+
workflow_dispatch:
12+
13+
env:
14+
REGISTRY: docker.io
15+
IMAGE_NAME: goaccess-for-nginxproxymanager
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
packages: write
24+
# This is used to complete the identity challenge
25+
# with sigstore/fulcio when running outside of PRs.
26+
id-token: write
27+
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v2
31+
32+
- name: Set up QEMU
33+
uses: docker/setup-qemu-action@v1
34+
35+
- name: Setup Docker buildx
36+
uses: docker/setup-buildx-action@v1
37+
38+
- name: Login to Docker Hub
39+
uses: docker/login-action@v1
40+
with:
41+
username: ${{ secrets.DOCKERHUB_USERNAME }}
42+
password: ${{ secrets.DOCKERHUB_TOKEN }}
43+
44+
- name: Build the Docker image
45+
run: docker buildx build --push --platform linux/amd64,linux/arm/v7,linux/arm64/v8 --tag ${{ secrets.DOCKERHUB_USERNAME }}/goaccess-for-nginxproxymanager .

0 commit comments

Comments
 (0)