Skip to content

Publish

Publish #15

Workflow file for this run

name: Publish
on:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare tags
id: vars
run: |
echo "sha_short="$(git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: |
forbole/big-dipper-landing:revamp-${{ steps.vars.outputs.sha_short }}
forbole/big-dipper-landing:revamp-latest