ci: create manifest from nightly db dev images (x64 + arm64)
This commit is contained in:
parent
8c9c198d27
commit
816cf8867e
52
.github/workflows/dev-db-nightly.yml
vendored
52
.github/workflows/dev-db-nightly.yml
vendored
|
@ -20,24 +20,24 @@ on:
|
|||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: datatracker-db
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docker Images
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.ref == 'refs/heads/main' }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/arm64
|
||||
docker: arm64
|
||||
- platform: linux/amd64
|
||||
docker: x64
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get Current Date as Tag
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
@ -57,9 +57,35 @@ jobs:
|
|||
with:
|
||||
context: .
|
||||
file: docker/db.Dockerfile
|
||||
platforms: linux/amd64
|
||||
# platforms: linux/amd64,linux/arm64
|
||||
platforms: ${{ matrix.platform }}
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/ietf-tools/datatracker-db:nightly-${{ steps.date.outputs.date }}
|
||||
ghcr.io/ietf-tools/datatracker-db:latest
|
||||
tags: ghcr.io/ietf-tools/datatracker-db:latest-${{ matrix.platform }}
|
||||
|
||||
combine:
|
||||
name: Create Docker Manifests
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
permissions:
|
||||
packages: write
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get Current Date as Tag
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d')"
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create and Push Manifests
|
||||
run: |
|
||||
echo "Creating the manifests..."
|
||||
docker manifest create ghcr.io/ietf-tools/datatracker-db:nightly-${{ steps.date.outputs.date }} ghcr.io/ietf-tools/datatracker-db:latest-x64 ghcr.io/ietf-tools/datatracker-db:latest-arm64
|
||||
docker manifest create ghcr.io/ietf-tools/datatracker-db:latest ghcr.io/ietf-tools/datatracker-db:latest-x64 ghcr.io/ietf-tools/datatracker-db:latest-arm64
|
||||
echo "Pushing the manifests..."
|
||||
docker manifest push -p ghcr.io/ietf-tools/datatracker-db:nightly-${{ steps.date.outputs.date }}
|
||||
docker manifest push -p ghcr.io/ietf-tools/datatracker-db:latest
|
||||
|
|
Loading…
Reference in a new issue