-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build docker image using github actions (#276)
* Build docker image using github actions * update update update update update override update * Pull the right sha use the right sha? * Login to dockerhub * Keep sha length consistent * Run gh actions manually
- Loading branch information
1 parent
bf1a12d
commit eea48fb
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_protected == 'true' && github.sha || github.ref }}-{{ github.event_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-docker-image: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Add SHORT_SHA env property with commit short sha | ||
run: | | ||
SHORT_SHA=$(git rev-parse --short=9 ${{ github.event.pull_request.head.sha }}) | ||
echo "SHORT_SHA=$SHORT_SHA" >> $GITHUB_ENV | ||
echo "Short SHA: $SHORT_SHA" | ||
- name: Make docker image | ||
working-directory: . | ||
run: make docker-build | ||
env: | ||
ETLHASH: stellar/stellar-etl-dev:${SHORT_SHA} | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@bb984efc561711aaa26e433c32c3521176eae55b | ||
with: | ||
username: stellardataeng | ||
password: ${{ secrets.DOCKER_CREDS_DEV }} | ||
|
||
- name: Push docker image | ||
working-directory: . | ||
run: docker push stellar/stellar-etl-dev:${SHORT_SHA} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters