Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .github/workflows/docker_buildx_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Gateway Docker Buildx Workflow

on:
pull_request:
types: [closed]
push:
branches:
- main
- development
Expand All @@ -11,45 +10,45 @@
types: [published, edited]

jobs:
build_pr:
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true
build_push:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Development Image
if: github.base_ref == 'development'
if: github.ref == 'refs/heads/development'
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: hummingbot/gateway:development

- name: Build and push Latest Image
if: github.base_ref == 'main'
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: hummingbot/gateway:latest

build_release:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
Expand Down
Loading