Difference between revisions of "Uses: docker/build-push-action"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
* https://github.com/docker/build-push-action | * https://github.com/docker/build-push-action | ||
+ | |||
+ | == Official example == | ||
+ | <pre> | ||
+ | name: ci | ||
+ | |||
+ | on: | ||
+ | push: | ||
+ | |||
+ | jobs: | ||
+ | docker: | ||
+ | runs-on: ubuntu-latest | ||
+ | steps: | ||
+ | - | ||
+ | name: Set up QEMU | ||
+ | uses: docker/setup-qemu-action@v3 | ||
+ | - | ||
+ | name: Set up Docker Buildx | ||
+ | uses: docker/setup-buildx-action@v3 | ||
+ | - | ||
+ | name: Login to Docker Hub | ||
+ | uses: docker/login-action@v3 | ||
+ | with: | ||
+ | username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
+ | password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
+ | - | ||
+ | name: Build and push | ||
+ | uses: docker/build-push-action@v6 | ||
+ | with: | ||
+ | push: true | ||
+ | tags: user/app:latest | ||
+ | </pre> | ||
Line 7: | Line 38: | ||
[[tags:]] | [[tags:]] | ||
[[uses: docker/bake-action]] | [[uses: docker/bake-action]] | ||
+ | [[buildx]] | ||
== See also == | == See also == |
Latest revision as of 06:42, 17 July 2024
Official example[edit]
name: ci on: push: jobs: docker: runs-on: ubuntu-latest steps: - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push uses: docker/build-push-action@v6 with: push: true tags: user/app:latest
Related[edit]
tags: uses: docker/bake-action buildx
See also[edit]
Advertising: