Playing with buildx
This commit is contained in:
@@ -12,7 +12,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push-image:
|
build-and-push-image:
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -25,27 +25,33 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to registry
|
- name: Build image
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
buildx build .
|
||||||
registry: ${{ env.REGISTRY }}
|
# - name: Log in to registry
|
||||||
username: ${{ gitea.actor }}
|
# uses: docker/login-action@v3
|
||||||
password: ${{ secrets.AUTH_TOKEN }}
|
# with:
|
||||||
|
# registry: ${{ env.REGISTRY }}
|
||||||
|
# username: ${{ gitea.actor }}
|
||||||
|
# password: ${{ secrets.AUTH_TOKEN }}
|
||||||
|
|
||||||
- name: Extract metadata for registry
|
# - name: Extract metadata for registry
|
||||||
id: meta
|
# id: meta
|
||||||
uses: docker/metadata-action@v5
|
# uses: docker/metadata-action@v5
|
||||||
with:
|
# with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: type=raw,value=latest,enable={{is_default_branch}}
|
# tags: type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Build and push Docker image
|
# - name: Build and push Docker image
|
||||||
uses: docker/build-push-action@v5
|
# uses: docker/build-push-action@v5
|
||||||
with:
|
# with:
|
||||||
context: .
|
# context: .
|
||||||
push: true
|
# push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
# tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
# labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
Reference in New Issue
Block a user