Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
update

update

update

update

override

update
  • Loading branch information
amishas157 committed Aug 9, 2024
1 parent 5141b12 commit 37fa6a5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,18 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Make docker image
uses: make docker-build
- name: Add SHORT_SHA env property with commit short sha
run: |
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-7)
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV
echo "Short SHA: $SHORT_SHA"
- name: Retag docker image
uses: docker tag stellar/stellar-etl:${{ github.sha }} stellar/stellar-etl-dev:${{ github.sha }}
- name: Make docker image
working-directory: .
run: make docker-build
env:
ETLHASH: stellar/stellar-etl-dev:${SHORT_SHA}

- name: Push docker image
uses: docker push stellar/stellar-etl-dev:${{ github.sha }}
working-directory: .
run: docker push stellar/stellar-etl-dev:${SHORT_SHA}
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo")
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
BUILD_DATE := $(shell date -u +%FT%TZ)

ETLHASH=stellar/stellar-etl:$(shell git rev-parse --short HEAD)
DEFAULT_ETLHASH := stellar/stellar-etl:$(shell git rev-parse --short HEAD)
ETLHASH ?= $(DEFAULT_ETLHASH)

docker-build:
$(SUDO) docker build --platform linux/amd64 --pull --no-cache --label org.opencontainers.image.created="$(BUILD_DATE)" \
Expand Down

0 comments on commit 37fa6a5

Please sign in to comment.