Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Following iron-up and fixes for container builds #398

Merged
merged 1 commit into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ on:
push:
branches:
- main
tags:
- "v*"
paths:
- ".github/workflows/docker.yml"
# We use local reusable workflows to make architecture clean an simple
Expand Down Expand Up @@ -165,14 +167,14 @@ jobs:
uses: ./.github/workflows/docker-push.yml
strategy:
matrix:
image: ["base", "base-with-services"]
image: ["base", "base-with-services", "lab", "full-stack"]
with:
architecture: amd64
image: ${{ matrix.image }}
registry: docker.io
secrets:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
REGISTRY_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKER_PASSWORD }}
needs: [amd64-base, amd64-base-with-services, amd64-lab, amd64-full-stack]

arm64-push-dockerhub:
Expand All @@ -186,8 +188,8 @@ jobs:
image: ${{ matrix.image }}
registry: docker.io
secrets:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
REGISTRY_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKER_PASSWORD }}
needs: [arm64-base, arm64-base-with-services, arm64-lab, arm64-full-stack]

merge-tags-dockerhub:
Expand All @@ -200,6 +202,18 @@ jobs:
image: ${{ matrix.image }}
registry: docker.io
secrets:
REGISTRY_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
REGISTRY_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKER_PASSWORD }}
needs: [amd64-push-dockerhub, arm64-push-dockerhub]

release:
runs-on: ubuntu-latest
needs: [merge-tags-ghcr, merge-tags-dockerhub]
steps:
- uses: actions/checkout@v3

- name: Create release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
if: github.repository == 'aiidalab/aiidalab-docker-stack' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
5 changes: 0 additions & 5 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ variable "PLATFORMS" {
default = ["linux/amd64"]
}

function "arch2platform" {
params = [arch]
result = "linux/${arch}"
}

variable "TARGETS" {
default = ["base", "base-with-services", "lab", "full-stack"]
}
Expand Down
4 changes: 1 addition & 3 deletions stack/base-with-services/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# syntax=docker/dockerfile:1
ARG OWNER=aiidalab
ARG BASE_CONTAINER=$OWNER/base
FROM $BASE_CONTAINER
FROM base

LABEL maintainer="AiiDAlab Team <aiidalab@materialscloud.org>"

Expand Down
5 changes: 2 additions & 3 deletions stack/full-stack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# syntax=docker/dockerfile:1
ARG OWNER=aiidalab
FROM $OWNER/base-with-services as base
FROM base-with-services as base

FROM $OWNER/lab
FROM lab

USER root

Expand Down
4 changes: 1 addition & 3 deletions stack/lab/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# syntax=docker/dockerfile:1
ARG OWNER=aiidalab
ARG BASE_CONTAINER=$OWNER/base
FROM $BASE_CONTAINER
FROM base

LABEL maintainer="AiiDAlab Team <aiidalab@materialscloud.org>"

Expand Down