|
|
|
|
@ -72,20 +72,16 @@ jobs:
|
|
|
|
|
docker:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
-
|
|
|
|
|
name: Set up QEMU
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
-
|
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
-
|
|
|
|
|
name: Login to Docker Hub
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
|
with:
|
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
-
|
|
|
|
|
name: Build and push
|
|
|
|
|
- name: Build and push
|
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
|
with:
|
|
|
|
|
push: true
|
|
|
|
|
@ -104,13 +100,11 @@ expression `{{defaultContext}}`. Here we can use it to provide a subdirectory
|
|
|
|
|
to the default Git context:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
-
|
|
|
|
|
# Setting up Docker Buildx with docker-container driver is required
|
|
|
|
|
# at the moment to be able to use a subdirectory with Git context
|
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
-
|
|
|
|
|
name: Build and push
|
|
|
|
|
- name: Build and push
|
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
|
with:
|
|
|
|
|
context: "{{defaultContext}}:mysubdir"
|
|
|
|
|
@ -132,8 +126,7 @@ private repository, you have to use a [secret](https://docs.docker.com/build/ci/
|
|
|
|
|
named `GIT_AUTH_TOKEN` to be able to authenticate against it with Buildx:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
-
|
|
|
|
|
name: Build and push
|
|
|
|
|
- name: Build and push
|
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
|
with:
|
|
|
|
|
push: true
|
|
|
|
|
@ -156,23 +149,18 @@ jobs:
|
|
|
|
|
docker:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
-
|
|
|
|
|
name: Checkout
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
-
|
|
|
|
|
name: Set up QEMU
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
-
|
|
|
|
|
name: Set up Docker Buildx
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
|
-
|
|
|
|
|
name: Login to Docker Hub
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
|
with:
|
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
|
-
|
|
|
|
|
name: Build and push
|
|
|
|
|
- name: Build and push
|
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
|
with:
|
|
|
|
|
context: .
|
|
|
|
|
|