Skip to content

Commit

Permalink
Split out the master Horizon jobs, to avoid adding noise to PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Mar 1, 2022
1 parent f523f56 commit 946b584
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 46 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/horizon-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Horizon

on:
push:
branches: [master]
# TODO: Pull requests enabled temporarily, to test the code, remove before merging!
pull_request:

jobs:

push-horizon-image-sha:
name: Push stellar/horizon:sha to DockerHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get image tag (short sha)
shell: bash
id: get_tag
run: echo ::set-output name=TAG::$(git rev-parse --short HEAD)

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push to DockerHub
uses: docker/build-push-action@v2
with:
# TODO: Commented out until we disable the CircleCI jobs
# push: true
tags: stellar/horizon:${{ steps.get_tag.outputs.TAG }}
file: services/horizon/docker/Dockerfile.dev

push-state-diff-image:
name: Push stellar/ledger-state-diff:{sha,latest} to DockerHub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push to DockerHub
uses: docker/build-push-action@v2
with:
# TODO: Commented out until we disable the CircleCI jobs
# push: true
tags: stellar/ledger-state-diff:${{ github.sha }},stellar/ledger-state-diff:latest
file: exp/tools/dump-ledger-state/Dockerfile
build-args: GITCOMMIT=${{ github.sha }}
no-cache: true
2 changes: 2 additions & 0 deletions .github/workflows/horizon-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:

publish-artifacts:
runs-on: ubuntu-latest
name: Upload artifacts to GitHub release
steps:
- name: Run deprecation tests
shell: bash
Expand Down Expand Up @@ -44,6 +45,7 @@ jobs:

push-horizon-image:
runs-on: ubuntu-latest
name: Push stellar/horizon:{version,latest} to DockerHub
steps:
- uses: actions/checkout@v2

Expand Down
47 changes: 1 addition & 46 deletions .github/workflows/horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:

integration:
name: Integration tests
strategy:
matrix:
os: [ubuntu-latest]
Expand Down Expand Up @@ -87,49 +88,3 @@ jobs:
# TODO(fons): Commented out until we disable the CircleCI jobs
run: \# docker push stellar/horizon-verify-range

push-horizon-image:
if: ${{ github.ref == 'master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Get image tag (short sha)
shell: bash
id: get_tag
run: echo ::set-output name=TAG::$(git rev-parse --short HEAD)

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push to DockerHub
uses: docker/build-push-action@v2
with:
# TODO: Commented out until we disable the CircleCI jobs
# push: true
tags: stellar/horizon:${{ steps.get_tag.outputs.TAG }}
file: services/horizon/docker/Dockerfile.dev

push-state-diff-image:
if: ${{ github.ref == 'master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push to DockerHub
uses: docker/build-push-action@v2
with:
# TODO: Commented out until we disable the CircleCI jobs
# push: true
tags: stellar/ledger-state-diff:${{ github.sha }},stellar/ledger-state-diff:latest
file: exp/tools/dump-ledger-state/Dockerfile
build-args: GITCOMMIT=${{ github.sha }}
no-cache: true

0 comments on commit 946b584

Please sign in to comment.