Skip to content

Commit

Permalink
docker hub mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Feb 24, 2024
1 parent 559e46e commit 3d0f320
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
php: ["8.1"]
php: ["8.2"]
name: Build on PHP ${{ matrix.php }} ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ env.GHCR_SLUG }}
Expand All @@ -32,19 +32,19 @@ jobs:
org.opencontainers.image.description=Chevereto V4
org.opencontainers.image.vendor=Chevereto
- 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 GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare Chevereto
run: mkdir -p ./chevereto
- name: Build
uses: docker/bake-action@v2
uses: docker/bake-action@v4
with:
set: build.args.PHP=${{ matrix.php }}
files: |
Expand All @@ -53,9 +53,17 @@ jobs:
targets: build
push: true
- name: Check manifest
run: |
docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
run: docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
- name: Inspect image
run: |
docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to Docker Hub
run: |
docker tag ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }} chevereto/chevereto:${{ steps.meta.outputs.version }}
docker push chevereto/chevereto:${{ steps.meta.outputs.version }}

0 comments on commit 3d0f320

Please sign in to comment.