diff --git a/.github/workflows/image-release.yml b/.github/workflows/image-release.yml index 7ebad66..01a053e 100644 --- a/.github/workflows/image-release.yml +++ b/.github/workflows/image-release.yml @@ -32,15 +32,18 @@ on: jobs: release: - runs-on: [self-hosted, ARM64, stable] + runs-on: ubuntu-latest environment: DOCKER_HUB + permissions: + contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v4 - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | ${{ inputs.image-name }} @@ -58,19 +61,20 @@ jobs: type=raw,value=${{ inputs.volto-version }} - 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 Registry + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.registry-username }} - password: ${{ secrets.registry-password }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: platforms: ${{ inputs.platforms }} context: . diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1bcd006..d6fb67a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -9,9 +9,11 @@ on: jobs: release: - runs-on: [self-hosted, ARM64, stable] + runs-on: ubuntu-latest environment: DOCKER_HUB - + permissions: + contents: read + packages: write steps: - name: Checkout @@ -19,7 +21,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags images: | @@ -33,19 +35,20 @@ jobs: type=schedule,pattern=nightly-{{date 'YYYYMMDD'}} - 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.4.1 + uses: docker/setup-buildx-action@v3.4.1 - - name: Login to DockerHub + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64 context: . diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e02b3f..6ddb1af 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,12 +2,12 @@ name: Release new Docker image on: push: - tags: - - 'v*' + branches: + - newapproach workflow_dispatch: env: - BASE_IMAGE_NAME: plone/frontend + BASE_IMAGE_NAME: ghcr.io/kitconcept/frontend PLATFORMS: linux/amd64,linux/arm64 IS_LATEST: false @@ -81,7 +81,7 @@ jobs: uses: ./.github/workflows/image-release.yml with: volto-version: ${{ needs.meta.outputs.VOLTO_VERSION }} - image-name: plone/plone-frontend + image-name: ghcr.io/kitconcept/plone-frontend dockerfile: Dockerfile platforms: ${{ needs.meta.outputs.PLATFORMS }} is-latest: ${{ needs.meta.outputs.IS_LATEST == 'true' }} diff --git a/.github/workflows/runnertest.yml b/.github/workflows/runnertest.yml index 6f864a7..c00f873 100644 --- a/.github/workflows/runnertest.yml +++ b/.github/workflows/runnertest.yml @@ -16,7 +16,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags images: | @@ -29,10 +29,10 @@ jobs: type=raw,value=buildtest - 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 DockerHub uses: docker/login-action@v3 @@ -41,7 +41,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: platforms: linux/amd64,linux/arm64 context: . diff --git a/Dockerfile b/Dockerfile index 18f6988..3b479c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ # syntax=docker/dockerfile:1 ARG VOLTO_VERSION -FROM plone/frontend-builder:${VOLTO_VERSION} as builder +FROM ghcr.io/kitconcept/frontend-builder:${VOLTO_VERSION} as builder # Build Volto Project and then remove directories not needed for production -RUN <