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

feat: hydrobuild #26

Closed
wants to merge 1 commit into from
Closed
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
304 changes: 66 additions & 238 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- hydro-build
paths:
- "Dockerfile.template"
- ".github/workflows/build.yml"
Expand All @@ -19,36 +20,8 @@ permissions:
packages: write

jobs:
php80-arm64:
name: 8.0 on ARM64
runs-on: buildjet-2vcpu-ubuntu-2204-arm
steps:
- uses: actions/checkout@v3

- name: Install Cosign
uses: sigstore/cosign-installer@v3

- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: docker/build-push-action@v4
with:
tags: ghcr.io/shopware/docker-base:8.0.28-arm64
context: "8.0"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.0-arm64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.0-arm64,mode=max
platforms: linux/arm64
push: true
provenance: false

php80-amd64:
name: 8.0 on AMD64
php80:
name: 8.0
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand All @@ -59,49 +32,29 @@ jobs:
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "shopware/default"

- uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
tags: ghcr.io/shopware/docker-base:8.0.28-amd64
tags: ghcr.io/shopware/docker-base-hydro:8.0.28
context: "8.0"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.0-amd64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.0-amd64,mode=max
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
provenance: false

php81-arm64:
name: 8.1 on ARM64
runs-on: buildjet-2vcpu-ubuntu-2204-arm
steps:
- uses: actions/checkout@v3

- name: Install Cosign
uses: sigstore/cosign-installer@v3

- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: docker/build-push-action@v4
with:
tags: ghcr.io/shopware/docker-base:8.1.24-arm64
context: "8.1"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.1-arm64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.1-arm64,mode=max
platforms: linux/arm64
push: true
provenance: false

php81-amd64:
name: 8.1 on AMD64
php81:
name: 8.1
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand All @@ -112,49 +65,29 @@ jobs:
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "shopware/default"

- uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
tags: ghcr.io/shopware/docker-base:8.1.24-amd64
tags: ghcr.io/shopware/docker-base-hydro:8.1.24
context: "8.1"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.1-amd64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.1-amd64,mode=max
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
provenance: false

php82-arm64:
name: 8.2 on ARM64
runs-on: buildjet-2vcpu-ubuntu-2204-arm
steps:
- uses: actions/checkout@v3

- name: Install Cosign
uses: sigstore/cosign-installer@v3

- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: docker/build-push-action@v4
with:
tags: ghcr.io/shopware/docker-base:8.2.11-arm64
context: "8.2"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.2-arm64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.2-arm64,mode=max
platforms: linux/arm64
push: true
provenance: false

php82-amd64:
name: 8.2 on AMD64
php82:
name: 8.2
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand All @@ -165,49 +98,29 @@ jobs:
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "shopware/default"

- uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
tags: ghcr.io/shopware/docker-base:8.2.11-amd64
tags: ghcr.io/shopware/docker-base-hydro:8.2.11
context: "8.2"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.2-amd64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.2-amd64,mode=max
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
provenance: false

php83-arm64:
name: 8.3 on ARM64
runs-on: buildjet-2vcpu-ubuntu-2204-arm
steps:
- uses: actions/checkout@v3

- name: Install Cosign
uses: sigstore/cosign-installer@v3

- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- uses: docker/build-push-action@v4
with:
tags: ghcr.io/shopware/docker-base:8.3.0RC5-arm64
context: "8.3"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.3-arm64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.3-arm64,mode=max
platforms: linux/arm64
push: true
provenance: false

php83-amd64:
name: 8.3 on AMD64
php83:
name: 8.3
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
Expand All @@ -218,109 +131,24 @@ jobs:
- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "shopware/default"

- uses: docker/build-push-action@v4
- uses: docker/build-push-action@v5
with:
tags: ghcr.io/shopware/docker-base:8.3.0RC5-amd64
tags: ghcr.io/shopware/docker-base-hydro:8.3.0RC5
context: "8.3"
cache-from: type=registry,ref=ghcr.io/shopware/docker-cache:8.3-amd64
cache-to: type=registry,ref=ghcr.io/shopware/docker-cache:8.3-amd64,mode=max
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
provenance: false


merge-manifest:
name: Merge Manifest
runs-on: ubuntu-latest
needs:
- php80-arm64
- php80-amd64
- php81-arm64
- php81-amd64
- php82-arm64
- php82-amd64
- php83-arm64
- php83-amd64

steps:
- name: Login into Docker Hub
run: echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin

- name: Login into Github Docker Registery
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Install Cosign
uses: sigstore/cosign-installer@v3

- name: Install Regclient
run: |
wget https://github.com/regclient/regclient/releases/latest/download/regctl-linux-amd64
chmod +x regctl-linux-amd64

- run: docker manifest create ghcr.io/shopware/docker-base:8.0 --amend ghcr.io/shopware/docker-base:8.0.28-amd64 --amend ghcr.io/shopware/docker-base:8.0.28-arm64

- run: docker manifest create ghcr.io/shopware/docker-base:8.0.28 --amend ghcr.io/shopware/docker-base:8.0.28-amd64 --amend ghcr.io/shopware/docker-base:8.0.28-arm64

- run: docker manifest push ghcr.io/shopware/docker-base:8.0

- run: docker manifest push ghcr.io/shopware/docker-base:8.0.28

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.0

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.0.28

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.0 shopware/docker-base:8.0

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.0.28 shopware/docker-base:8.0.28

- run: docker manifest create ghcr.io/shopware/docker-base:8.1 --amend ghcr.io/shopware/docker-base:8.1.24-amd64 --amend ghcr.io/shopware/docker-base:8.1.24-arm64

- run: docker manifest create ghcr.io/shopware/docker-base:8.1.24 --amend ghcr.io/shopware/docker-base:8.1.24-amd64 --amend ghcr.io/shopware/docker-base:8.1.24-arm64

- run: docker manifest push ghcr.io/shopware/docker-base:8.1

- run: docker manifest push ghcr.io/shopware/docker-base:8.1.24

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.1

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.1.24

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.1 shopware/docker-base:8.1

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.1.24 shopware/docker-base:8.1.24

- run: docker manifest create ghcr.io/shopware/docker-base:8.2 --amend ghcr.io/shopware/docker-base:8.2.11-amd64 --amend ghcr.io/shopware/docker-base:8.2.11-arm64

- run: docker manifest create ghcr.io/shopware/docker-base:8.2.11 --amend ghcr.io/shopware/docker-base:8.2.11-amd64 --amend ghcr.io/shopware/docker-base:8.2.11-arm64

- run: docker manifest push ghcr.io/shopware/docker-base:8.2

- run: docker manifest push ghcr.io/shopware/docker-base:8.2.11

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.2

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.2.11

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.2 shopware/docker-base:8.2

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.2.11 shopware/docker-base:8.2.11

- run: docker manifest create ghcr.io/shopware/docker-base:8.3 --amend ghcr.io/shopware/docker-base:8.3.0RC5-amd64 --amend ghcr.io/shopware/docker-base:8.3.0RC5-arm64

- run: docker manifest create ghcr.io/shopware/docker-base:8.3.0RC5 --amend ghcr.io/shopware/docker-base:8.3.0RC5-amd64 --amend ghcr.io/shopware/docker-base:8.3.0RC5-arm64

- run: docker manifest push ghcr.io/shopware/docker-base:8.3

- run: docker manifest push ghcr.io/shopware/docker-base:8.3.0RC5

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.3

- run: cosign sign --yes ghcr.io/shopware/docker-base:8.3.0RC5

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.3 shopware/docker-base:8.3

- run: ./regctl-linux-amd64 image copy ghcr.io/shopware/docker-base:8.3.0RC5 shopware/docker-base:8.3.0RC5


Loading