standardize yaml format

Signed-off-by: shubhindia <shubhindia123@gmail.com>
This commit is contained in:
shubhindia 2023-08-04 10:27:38 +05:30
parent 4fad532b9f
commit c904ae54f8

View file

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