From 39dfdd34b058b9a5254b22a04214b48cfe02ff84 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Mon, 29 Jul 2024 14:32:02 -0500 Subject: [PATCH] =?UTF-8?q?feat(apcd):=20workflow=20for=20"-"=20=E2=86=92?= =?UTF-8?q?=20"=5F"=20rename?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/apcd-cms-with-_.yml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/apcd-cms-with-_.yml diff --git a/.github/workflows/apcd-cms-with-_.yml b/.github/workflows/apcd-cms-with-_.yml new file mode 100644 index 00000000..f755629a --- /dev/null +++ b/.github/workflows/apcd-cms-with-_.yml @@ -0,0 +1,39 @@ +name: APCD CMS (with Underscore) Builds +on: + workflow_dispatch: + push: + branches: [main] + paths: + - "apcd_cms/**" + +jobs: + build_commit: + runs-on: ubuntu-latest + defaults: + run: + working-directory: apcd_cms + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set shortsha and branch environment variables + id: vars + run: | + echo "BRANCH_NAME=$(echo ${GITHUB_REF_NAME} | sed 's/[^[:alnum:]\.\_\-]/-/g')" >> "$GITHUB_OUTPUT"; + echo "SHORT_SHA=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"; + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build & push commit tagged Docker image + uses: docker/build-push-action@v5 + with: + context: apcd_cms + push: true + tags: taccwma/apcd-cms:${{ steps.vars.outputs.SHORT_SHA }},taccwma/apcd-cms:${{ steps.vars.outputs.BRANCH_NAME }}