CONTRIBUTING.md editing #779
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TACC Docs Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- | |
name: Checkout repo | |
uses: actions/checkout@v3 | |
- | |
name: Get shortsha and branch name | |
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} | |
SHORT_REF=`git describe --exact-match --tags 2>/dev/null || git symbolic-ref --short HEAD | sed 's/[^[:alnum:]\.\_\-]/-/g'` | |
echo ::set-output name=ref_short::${SHORT_REF} | |
env: | |
EVENT_SHA: ${{ github.event.client_payload.sha }} | |
- name: Print vars | |
run: | | |
echo $SHORT_SHA | |
echo $SHORT_REF | |
env: | |
SHORT_SHA: ${{ steps.vars.outputs.sha_short }} | |
SHORT_REF: ${{ steps.vars.outputs.ref_short }} | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- | |
name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
tags: taccwma/tacc-docs:latest,taccwma/tacc-docs:${{ steps.vars.outputs.sha_short }},taccwma/tacc-docs:${{ steps.vars.outputs.ref_short }} | |
- | |
name: Post build status in slack | |
id: slack | |
uses: slackapi/slack-github-action@v1.23.0 | |
with: | |
# This data can be any valid JSON from a previous step in the GitHub Action | |
payload: | | |
{ | |
"build_status": "${{ job.status }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |