Skip to content

Commit

Permalink
ci(bats-assert): align actions versions and push events
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jul 11, 2023
1 parent c3679c7 commit 1c4dc3d
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions .github/workflows/bats-assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ on:
push:
branches:
- 'master'
- 'v2'
paths:
- '.github/workflows/bats-assert.yml'
- 'util/bats-assert/**'
pull_request:
branches:
- 'master'
paths:
- '.github/workflows/bats-assert.yml'
- 'util/bats-assert/**'
Expand All @@ -19,22 +16,29 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Test
working-directory: ./util/bats-assert
run: docker buildx bake test
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1.6.0
if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Publish
if: github.ref == 'pull_refs/heads/master'
working-directory: ./util/bats-assert
run: docker buildx bake all --push
uses: docker/bake-action@v2
with:
workdir: ./util/bats-assert
targets: all
push: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}

0 comments on commit 1c4dc3d

Please sign in to comment.