diff --git a/.github/workflows/continuous-deployment.yaml b/.github/workflows/continuous-deployment.yaml index 621d34c..32a46d9 100644 --- a/.github/workflows/continuous-deployment.yaml +++ b/.github/workflows/continuous-deployment.yaml @@ -24,14 +24,22 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 1 - - name: build and push - uses: docker/build-push-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: gogaille/bref + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - repository: gogaille/bref username: ${{ secrets.DOCKER_HUB_USERNAME }} password: ${{ secrets.DOCKER_HUB_PASSWORD }} - path: ./bref + - name: build and push + uses: docker/build-push-action@v5 + with: + context: ./bref push: true - tag_with_ref: true - tag_with_sha: true - add_git_labels: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index f2877e2..1a31081 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -4,6 +4,7 @@ on: pull_request env: DOCKER_BUILDKIT: 1 + TEST_TAG: gogaille/bref:test jobs: bref: @@ -15,14 +16,20 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: gogaille/bref - name: build - uses: docker/build-push-action@v1 + uses: docker/build-push-action@v5 with: - repository: gogaille/bref - path: ./bref - tags: latest - push: false + context: ./bref + load: true + tags: ${{ env.TEST_TAG }} - name: test run: | - docker run --rm gogaille/bref php --version - docker run --rm gogaille/bref composer --version + docker run --rm ${{ env.TEST_TAG }} php --version + docker run --rm ${{ env.TEST_TAG }} composer --version diff --git a/bref/Dockerfile b/bref/Dockerfile index f9f32b2..df4e628 100644 --- a/bref/Dockerfile +++ b/bref/Dockerfile @@ -1,10 +1,10 @@ # syntax=docker/dockerfile:1.4 -ARG PHP_VERSION=82 +ARG PHP_VERSION=83 ARG ALPINE_VERSION=3.16 ARG BREF_VERSION=2 ARG REDIS_EXTRA_VERSION=1.0.0 -FROM bref/extra-redis-php-${PHP_VERSION}:${REDIS_EXTRA_VERSION} AS redis_extension +FROM bref/extra-redis-php-${PHP_VERSION} AS redis_extension FROM alpine:${ALPINE_VERSION} as tools-installer RUN apk add --no-cache curl gnupg @@ -49,7 +49,7 @@ ENV PATH=$PATH:/var:/var/task/bin \ HANDLER=public/index.php \ DOCUMENT_ROOT=public COPY --link entrypoint.sh /gogaille-entrypoint.sh -COPY --link --from=composer:2.5 /usr/bin/composer /usr/local/bin/composer +COPY --link --from=composer:2.6 /usr/bin/composer /usr/local/bin/composer COPY --link --from=phive /usr/local/bin/phive /usr/local/bin/ RUN phive --version COPY --link --from=hcl2json /usr/local/bin/hcl2json /usr/local/bin/