Skip to content

Commit

Permalink
Image version
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Rogerson committed Sep 27, 2023
1 parent 8d2e4e3 commit 686949e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: "ethereum-writer-deployer"

on:
pull_request:
branches:
- master
types:
- opened
- synchronize
Expand Down Expand Up @@ -146,6 +148,42 @@ jobs:
run: docker buildx build --platform linux/amd64,linux/arm64 -t orbsnetworkstaging/ethereum-writer:$(cat .version) --push .


release-to-staging-immediate:
if: github.event_name == 'pull_request' && github.event.label.name == 'immediate'
needs:
- build
- test
- determine-version
runs-on: ubuntu-latest
steps:
- name: Setup Docker
uses: docker-practice/actions-setup-docker@master

- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build
path: ./dist

- name: Download version artifact
uses: actions/download-artifact@v3
with:
name: version
path: ./

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_STAGING_LOGIN }}
password: ${{ secrets.DOCKER_HUB_STAGING_PASSWORD }}

- name: Build and push image

run: |
IMMEDIATE_VERSION=$(awk -F'-' '{print $1"-immediate"}' .version)
docker buildx build --platform linux/amd64,linux/arm64 -t orbsnetworkstaging/ethereum-writer:$IMMEDIATE_VERSION --push .
# release-to-staging:
# if: github.event_name == 'pull_request' && github.head_ref == 'main'
# needs: build-and-test
Expand Down

0 comments on commit 686949e

Please sign in to comment.