Skip to content

Commit 79f26ff

Browse files
authored
add buildx (#143)
1 parent 76f1bdc commit 79f26ff

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/docker.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,30 @@ env:
99
REGISTRY: ghcr.io
1010
IMAGE_NAME: ${{ github.repository }}
1111

12-
# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
1312
jobs:
1413
build-and-push-image:
1514
runs-on: ubuntu-latest
16-
# Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
1715
permissions:
1816
contents: read
1917
packages: write
20-
#
2118
steps:
2219
- name: Checkout repository
2320
uses: actions/checkout@v4
24-
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
23+
- name: Set up Docker Buildx
24+
uses: docker/setup-buildx-action@v3
2525
- name: Log in to the Container registry
2626
uses: docker/login-action@v3
2727
with:
2828
registry: ${{ env.REGISTRY }}
2929
username: ${{ github.actor }}
3030
password: ${{ secrets.GITHUB_TOKEN }}
31-
# This step uses [docker/metadata-action](https://github.com/docker/metadata-action#about) to extract tags and labels that will be applied to the specified image. The `id` "meta" allows the output of this step to be referenced in a subsequent step. The `images` value provides the base name for the tags and labels.
3231
- name: Extract metadata (tags, labels) for Docker
3332
id: meta
3433
uses: docker/metadata-action@v5
3534
with:
3635
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37-
# This step uses the `docker/build-push-action` action to build the image, based on your repository's `Dockerfile`. If the build succeeds, it pushes the image to GitHub Packages.
38-
# It uses the `context` parameter to define the build's context as the set of files located in the specified path. For more information, see "[Usage](https://github.com/docker/build-push-action#usage)" in the README of the `docker/build-push-action` repository.
39-
# It uses the `tags` and `labels` parameters to tag and label the image with the output from the "meta" step.
4036
- name: Build and push Docker image
4137
uses: docker/build-push-action@v6
4238
with:

0 commit comments

Comments
 (0)