Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Librephotos Docker Scaling
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dev Ops
Librephotos Docker Scaling
Commits
a544564c
Unverified
Commit
a544564c
authored
3 years ago
by
Niaz
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add multiarch builds
parent
554c4eac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/backend.yml
+17
-27
17 additions, 27 deletions
.github/workflows/backend.yml
with
17 additions
and
27 deletions
.github/workflows/backend.yml
+
17
−
27
View file @
a544564c
...
@@ -29,7 +29,7 @@ jobs:
...
@@ -29,7 +29,7 @@ jobs:
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
name
:
Run tests
-
name
:
Run tests
run
:
docker build ./backend
run
:
echo "To-Do Add Running Tests"
build
:
build
:
# Ensure test job passes before pushing image.
# Ensure test job passes before pushing image.
...
@@ -38,35 +38,25 @@ jobs:
...
@@ -38,35 +38,25 @@ jobs:
runs-on
:
ubuntu-latest
runs-on
:
ubuntu-latest
steps
:
steps
:
-
name
:
Checkout
-
uses
:
actions/checkout@v2
-
uses
:
actions/checkout@v2
-
name
:
Build image
-
name
:
Set up QEMU
run
:
docker build ./backend --tag $IMAGE_NAME
uses
:
docker/setup-qemu-action@v1
-
name
:
Set up Docker Buildx
uses
:
docker/setup-buildx-action@v1
-
name
:
Login to Docker Hub
-
name
:
Login to Docker Hub
uses
:
docker/login-action@v1
uses
:
docker/login-action@v1
with
:
with
:
username
:
${{ secrets.DOCKER_HUB_USERNAME }}
username
:
${{ secrets.DOCKER_HUB_USERNAME }}
password
:
${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
password
:
${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
-
name
:
Push image
-
name
:
Build and push
run
:
|
uses
:
docker/build-push-action@v2
IMAGE_ID=reallibrephotos/$IMAGE_NAME
with
:
context
:
.
# Change all uppercase to lowercase
platforms
:
linux/amd64,linux/arm64
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
push
:
true
tags
:
reallibrephotos/librephotos:dev
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `dev` tag
VERSION=dev
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment