Skip to content

Commit 8e7b2a0

Browse files
author
Jeremy Price
committed
swap around docker builds to see if we can coolate tags & architectures
1 parent f013a4c commit 8e7b2a0

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

.github/workflows/docker-arm.yml renamed to .github/workflows/docker-alpine.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Snipe-IT Docker image build for hub.docker.com
2-
name: Docker ARM images (Ubuntu and Alpine)
2+
name: Docker Alpine images
33

44
# Run this Build for all pushes to 'master' or develop branch, or tagged releases.
55
# Also run for PRs to ensure PR doesn't break Docker build process
@@ -8,6 +8,7 @@ on:
88
branches:
99
- master
1010
- develop
11+
- dockerhub-testing
1112
tags:
1213
- 'v**'
1314
# Allows you to run this workflow manually from the Actions tab
@@ -19,20 +20,20 @@ permissions:
1920
contents: read
2021

2122
jobs:
22-
docker-ubuntu-arm:
23+
docker-alpine-intel:
2324
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
2425
if: github.repository == 'grokability/snipe-it'
25-
runs-on: ubuntu-24.04-arm
26+
runs-on: ubuntu-latest
2627
env:
2728
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
2829
# For a new commit on default branch (master), use the literal tag 'latest' on Docker image.
2930
# For a new commit on other branches, use the branch name as the tag for Docker image.
3031
# For a new tag, copy that tag name as the tag for Docker image.
3132
IMAGE_TAGS: |
32-
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
33-
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
34-
type=ref,event=tag
35-
type=semver,pattern=v{{major}}-latest
33+
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
34+
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
35+
type=ref,event=tag,suffix=-alpine
36+
type=semver,pattern=v{{major}}-latest-alpine
3637
# Define default tag "flavor" for docker/metadata-action per
3738
# https://github.com/docker/metadata-action#flavor-input
3839
# We turn off 'latest' tag by default.
@@ -76,8 +77,8 @@ jobs:
7677
uses: docker/build-push-action@v6
7778
with:
7879
context: .
79-
file: ./Dockerfile
80-
platforms: linux/arm64
80+
file: ./Dockerfile.alpine
81+
platforms: linux/amd64
8182
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
8283
# but we ONLY do an image push to DockerHub if it's NOT a PR
8384
push: ${{ github.event_name != 'pull_request' }}

.github/workflows/docker-intel.yml renamed to .github/workflows/docker-ubuntu.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Snipe-IT Docker image build for hub.docker.com
2-
name: Docker Intel/amd64 images (Ubuntu)
2+
name: Docker Ubuntu images
33

44
# Run this Build for all pushes to 'master' or develop branch, or tagged releases.
55
# Also run for PRs to ensure PR doesn't break Docker build process
@@ -8,6 +8,7 @@ on:
88
branches:
99
- master
1010
- develop
11+
- dockerhub-testing
1112
tags:
1213
- 'v**'
1314
# Allows you to run this workflow manually from the Actions tab
@@ -19,10 +20,10 @@ permissions:
1920
contents: read
2021

2122
jobs:
22-
docker-ubuntu-intel:
23+
docker-ubuntu-arm:
2324
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
2425
if: github.repository == 'grokability/snipe-it'
25-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-24.04-arm
2627
env:
2728
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
2829
# For a new commit on default branch (master), use the literal tag 'latest' on Docker image.
@@ -77,14 +78,14 @@ jobs:
7778
with:
7879
context: .
7980
file: ./Dockerfile
80-
platforms: linux/amd64
81+
platforms: linux/arm64
8182
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
8283
# but we ONLY do an image push to DockerHub if it's NOT a PR
8384
push: ${{ github.event_name != 'pull_request' }}
8485
# Use tags / labels provided by 'docker/metadata-action' above
8586
tags: ${{ steps.meta_build.outputs.tags }}
8687
labels: ${{ steps.meta_build.outputs.labels }}
87-
docker-alpine-intel:
88+
docker-ubuntu-intel:
8889
# Ensure this job never runs on forked repos. It's only executed for 'grokability/snipe-it'
8990
if: github.repository == 'grokability/snipe-it'
9091
runs-on: ubuntu-latest
@@ -94,10 +95,10 @@ jobs:
9495
# For a new commit on other branches, use the branch name as the tag for Docker image.
9596
# For a new tag, copy that tag name as the tag for Docker image.
9697
IMAGE_TAGS: |
97-
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
98-
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }},suffix=-alpine
99-
type=ref,event=tag,suffix=-alpine
100-
type=semver,pattern=v{{major}}-latest-alpine
98+
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
99+
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
100+
type=ref,event=tag
101+
type=semver,pattern=v{{major}}-latest
101102
# Define default tag "flavor" for docker/metadata-action per
102103
# https://github.com/docker/metadata-action#flavor-input
103104
# We turn off 'latest' tag by default.
@@ -141,7 +142,7 @@ jobs:
141142
uses: docker/build-push-action@v6
142143
with:
143144
context: .
144-
file: ./Dockerfile.alpine
145+
file: ./Dockerfile
145146
platforms: linux/amd64
146147
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
147148
# but we ONLY do an image push to DockerHub if it's NOT a PR

0 commit comments

Comments
 (0)