-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 953 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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