-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 982 Bytes
/
release.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: Release
on:
push:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
env:
IMAGE_PLATFORMS: linux/amd64
IMAGE_TAG: latest
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ismdeep
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Check out code
uses: actions/checkout@v1
- name: Set Env
if: env.BRANCH_NAME != 'main'
run: |
echo "IMAGE_TAG=$(echo ${BRANCH_NAME} | tr / - | tr \# - )" >> $GITHUB_ENV
- name: Docker release
run: |
docker buildx build --platform ${IMAGE_PLATFORMS} --pull --push \
-t ismdeep/justoj-web:${IMAGE_TAG} \
-f Dockerfile .