Skip to content

Commit

Permalink
Merge pull request #3 from Ortege-xyz/feat/update-ci
Browse files Browse the repository at this point in the history
feat:CI Push images for push commits only
  • Loading branch information
josedev-union authored Nov 8, 2023
2 parents 512d867 + e764626 commit 5e87581
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: Build and Push Agent Image
on:
pull_request:
push:
branches: [master]
branches: [ortege]
tags:
- '**'
pull_request:
types: [synchronize, opened, reopened, ready_for_review]

concurrency:
group: build-push-agents-${{ github.ref }}
Expand Down Expand Up @@ -48,10 +47,16 @@ jobs:
username: ${{ secrets.CR_USERNAME }}
password: ${{ secrets.CR_PASSWORD }}

- shell: bash

- name: Set container registry token
if: github.event_name == 'push'
run: |
echo "DOCKERHUB_TOKEN=${{ secrets.CR_PASSWORD }}" >> $GITHUB_ENV
- name: Build and push images
shell: bash
env:
DOCKERHUB_USER: ${{ secrets.CR_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.CR_PASSWORD }}
run: |
GITHUB_RELEASE_TAG_NAME="${{ github.event.release.tag_name }}"
./scripts/docker_build_push.sh "$GITHUB_RELEASE_TAG_NAME" "${{ secrets.CR_ENDPOINT }}/ortege/superset" ""${{ secrets.CR_ENDPOINT }}

0 comments on commit 5e87581

Please sign in to comment.