diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58bfa9ea..bc608461 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,20 +21,17 @@ jobs: env: name: openmicroscopy/omero-server steps: - - name: Get prefix - id: getprefix - run: | - if [ ! -z ${{ env.name }} ]; then - echo "::set-output name=prefix::${{ env.name }}:" - else - echo "::set-output name=prefix::${{ github.repository }}:" - fi - name: Get other tags id: gettags - uses: jupyterhub/action-major-minor-tag-calculator@v1.1.0 + uses: jupyterhub/action-major-minor-tag-calculator@v2.0.0 with: githubToken: ${{ secrets.GITHUB_TOKEN }} - prefix: "${{ steps.getprefix.outputs.prefix }}" + prefix: "${{ env.name }}:" + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.name }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Login to DockerHub @@ -46,4 +43,5 @@ jobs: uses: docker/build-push-action@v2 with: tags: ${{ join(fromJson(steps.gettags.outputs.tags)) }} + labels: ${{ steps.meta.outputs.labels }} push: true diff --git a/Dockerfile b/Dockerfile index 9803495f..709b0585 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,5 @@ FROM centos:centos7.9.2009@sha256:dead07b4d8ed7e29e98de0f4504d87e8880d4347859d839686a31da35a3b532f LABEL maintainer="ome-devel@lists.openmicroscopy.org.uk" -LABEL org.opencontainers.image.created="unknown" -LABEL org.opencontainers.image.revision="unknown" -LABEL org.opencontainers.image.source="https://github.com/openmicroscopy/omero-server-docker" RUN mkdir /opt/setup WORKDIR /opt/setup diff --git a/Makefile b/Makefile index c7f68510..ab756819 100644 --- a/Makefile +++ b/Makefile @@ -34,8 +34,6 @@ ifndef VERSION endif perl -i -pe 's/OMERO_VERSION=(\S+)/OMERO_VERSION=$(VERSION)/' Dockerfile - perl -i -pe 's/(org.opencontainers.image.created=)"([^"]+)"/$$1"$(RELEASE)"/' Dockerfile - perl -i -pe 's/(org.opencontainers.image.revision=)"([^"]+)"/$$1"$(COMMIT)"/' Dockerfile ifndef BUILD git commit -a -m "Bump OMERO_VERSION to $(VERSION)"