Skip to content

Commit

Permalink
feat: TV3-181 PTDataX build config
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Jan 4, 2024
1 parent e9d4410 commit ffe2762
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ptdatax-cms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PTDataX CMS Builds
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'ptdatax_cms/**'

jobs:
build_commit:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ptdatax_cms
steps:
- uses: actions/checkout@v2
- name: Get shortsha
id: vars
run: |
if [ -z "$EVENT_SHA" ]; then SHORT_SHA=${GITHUB_SHA::8}; else SHORT_SHA=${EVENT_SHA::8}; fi
echo ::set-output name=sha_short::${SHORT_SHA}
env:
EVENT_SHA: ${{ github.event.client_payload.sha }}
- name: Print shortsha
run: |
echo $SHORTSHA
env:
SHORTSHA: ${{ steps.vars.outputs.sha_short }}
- uses: docker/setup-buildx-action@v2
name: Setup Docker Builds
- uses: docker/login-action@v2
name: Log in to docker
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v3
name: Build & push commit tagged Docker image
with:
context: ptdatax_cms
push: true
tags: taccwma/ptdatax-cms:${{ steps.vars.outputs.sha_short }}

0 comments on commit ffe2762

Please sign in to comment.