Skip to content

Commit

Permalink
Merge branch 'main' into refactor/apcd-cms-to-apcd_cms
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Jul 29, 2024
2 parents 24272a0 + 39dfdd3 commit 9c3ea8d
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/apcd-cms-with-_.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 9c3ea8d

Please sign in to comment.