Skip to content

Commit

Permalink
[ci] allow pushes from any branch (#30)
Browse files Browse the repository at this point in the history
* [ci] allow pushes from any branch

* checkout v4
  • Loading branch information
jameslamb authored Oct 23, 2023
1 parent 9121c28 commit c00fc76
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/publish_image.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Publish Docker image

on:
# Run manually by clicking a button in the UI
workflow_dispatch:
# Run automatically on new commits to specific branches
push:
branches:
- master
- dev
- dev2

jobs:
push_to_docker_hub:
Expand All @@ -23,9 +24,9 @@ jobs:
arch: linux/amd64
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -38,10 +39,10 @@ jobs:
docker_tag=${docker_tag%-master}
echo "::set-output name=docker_tag::${docker_tag}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
if: matrix.arch != 'linux/amd64'
- name: Build and push Docker image
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: ${{ github.workspace }}/dockers/${{ matrix.docker_image }}/
push: true
Expand Down

0 comments on commit c00fc76

Please sign in to comment.