From 8afa42d628b0700a1b9d53e3a3c78fbc2dd4d588 Mon Sep 17 00:00:00 2001 From: taoteg Date: Wed, 18 Oct 2023 11:00:44 -0500 Subject: [PATCH] Added the build workflow yml for netsage cms. --- .github/workflows/netsage-cms.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/netsage-cms.yml diff --git a/.github/workflows/netsage-cms.yml b/.github/workflows/netsage-cms.yml new file mode 100644 index 00000000..415c44a3 --- /dev/null +++ b/.github/workflows/netsage-cms.yml @@ -0,0 +1,41 @@ +name: Netsage CMS Builds +on: + workflow_dispatch: + push: + branches: [ main ] + paths: + - 'netsage_cms/**' + +jobs: + build_commit: + runs-on: ubuntu-latest + defaults: + run: + working-directory: netsage_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: netsage_cms + push: true + tags: taccwma/netsage-cms:${{ steps.vars.outputs.sha_short }} \ No newline at end of file