Skip to content

Commit

Permalink
Release v12.1 (#2)
Browse files Browse the repository at this point in the history
* Version bump and ref updates

* Build and push on PR

* (ci) Disable jobs

* Actually disable

* Store changes

* Renable GitHub builds

* vc-deps 1.9.0 release
  • Loading branch information
csparker247 authored Aug 5, 2024
1 parent f055138 commit 1b462aa
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 36 deletions.
38 changes: 20 additions & 18 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
name: Deploy Docker images

on:
workflow_dispatch:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches:
- "main"
release:
types: [published]

concurrency: docker

Expand All @@ -29,33 +28,34 @@ jobs:

- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/educelab/ci-docker
flavor: |
latest=false
tags: |
type=ref,prefix=base.,event=pr
type=ref,prefix=base.pr-,event=pr
type=semver,prefix=base.,pattern={{version}}
type=semver,prefix=base.,pattern={{major}}.{{minor}}
type=raw,prefix=base.,value=edge,enable={{is_default_branch}}
type=raw,prefix=base.,value=latest,enable={{ github.event_name == 'release' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

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

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.base
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -76,34 +76,36 @@ jobs:
steps:
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: ghcr.io/educelab/ci-docker
flavor: |
latest=false
tags: |
type=ref,prefix={{ matrix.type }}.,event=pr
type=ref,prefix={{ matrix.type }}.pr-,event=pr
type=semver,prefix={{ matrix.type }}.,pattern={{version}}
type=semver,prefix={{ matrix.type }}.,pattern={{major}}.{{minor}}
type=raw,value=edge,enable={{is_default_branch}}
type=raw,value=latest,enable={{ is_default_branch && matrix.type == 'static' }}
type=raw,prefix={{ matrix.type }}.,value=edge,enable={{is_default_branch}}
type=raw,prefix={{ matrix.type }}.,value=latest,enable={{ github.event_name == 'release' }}
type=raw,value=edge,enable={{ is_default_branch && matrix.type == 'static' }}
type=raw,value=latest,enable={{ github.event_name == 'release' && matrix.type == 'static' }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

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

- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v6
with:
file: ./Dockerfile.{{ matrix.type }}
push: ${{ github.event_name != 'pull_request' }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/cleanup_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cleanup Docker images

on: workflow_call
# pull_request:
# types: [closed]

jobs:
cleanup-pr-images:
name: Clean up PR images
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Remove PR tags
uses: dataaxiom/ghcr-cleanup-action@v1
with:
tags: '*.pr-${{github.event.pull_request.number}}'
dry-run: true
validate: true
token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 7 additions & 7 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM debian:bookworm-slim
MAINTAINER Seth Parker <[email protected]>
LABEL org.opencontainers.image.title ci-docker (base)
LABEL org.opencontainers.image.description Base system packages
LABEL org.opencontainers.image.source https://github.com/educelab/ci-docker
LABEL org.opencontainers.image.authors="Seth Parker <[email protected]>"
LABEL org.opencontainers.image.title="ci-docker (base)"
LABEL org.opencontainers.image.description="Base system packages"
LABEL org.opencontainers.image.source="https://github.com/educelab/ci-docker"

# Install apt sources
RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' > /etc/apt/sources.list.d/backports.list \
Expand Down Expand Up @@ -56,9 +56,9 @@ RUN apt-get install --fix-missing --fix-broken -y \
&& apt-get purge && rm -rf /var/lib/apt/lists/*

# Install Qt6
RUN curl -O -L https://download.qt.io/archive/qt/6.6/6.6.1/single/qt-everywhere-src-6.6.1.tar.xz \
&& tar -xf qt-everywhere-src-6.6.1.tar.xz \
&& cd qt-everywhere-src-6.6.1/ \
RUN curl -O -L https://download.qt.io/archive/qt/6.7/6.7.2/single/qt-everywhere-src-6.7.2.tar.xz \
&& tar -xf qt-everywhere-src-6.7.2.tar.xz \
&& cd qt-everywhere-src-6.7.2/ \
&& ./configure -opensource -nomake examples -nomake tests -bundled-xcb-xinput -confirm-license \
&& cmake --build . --parallel \
&& cmake --install . \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.dynamic
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ghcr.io/educelab/ci-docker:base.latest
MAINTAINER Seth Parker <[email protected]>
LABEL org.opencontainers.image.title ci-docker (dynamic)
LABEL org.opencontainers.image.description Dynamic vc-deps libraries
LABEL org.opencontainers.image.source https://github.com/educelab/ci-docker
LABEL org.opencontainers.image.authors="Seth Parker <[email protected]>"
LABEL org.opencontainers.image.title="ci-docker (dynamic)"
LABEL org.opencontainers.image.description="Dynamic vc-deps libraries"
LABEL org.opencontainers.image.source="https://github.com/educelab/ci-docker"

# Install vc-deps (dynamic)
COPY vc-deps/ /vc-deps/
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.static
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ghcr.io/educelab/ci-docker:base.latest
MAINTAINER Seth Parker <[email protected]>
LABEL org.opencontainers.image.title ci-docker (static)
LABEL org.opencontainers.image.description Static vc-deps libraries
LABEL org.opencontainers.image.source https://github.com/educelab/ci-docker
LABEL org.opencontainers.image.authors="Seth Parker <[email protected]>"
LABEL org.opencontainers.image.title="ci-docker (static)"
LABEL org.opencontainers.image.description="Static vc-deps libraries"
LABEL org.opencontainers.image.source="https://github.com/educelab/ci-docker"

# Install vc-deps (static)
COPY vc-deps/ /vc-deps/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ for [semantic versioning](https://semver.org/):
```bash
# build.sh
VER_MAJOR=12
VER_MINOR=0
VER_MINOR=1
VER_PATCH=0
```

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ timestamp() {

REPO=ghcr.io/educelab/ci-docker
VER_MAJOR=12
VER_MINOR=0
VER_MINOR=1
VER_PATCH=0
VER_FULL=${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}
REV=$(git rev-parse --verify HEAD)
Expand Down

0 comments on commit 1b462aa

Please sign in to comment.