-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (34 loc) · 1.01 KB
/
deploy.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
36
37
38
39
40
name: 'Deploy'
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Set image tag'
id: tag
run: |
REF=${{ github.ref }};
TAG_FULL=${REF#refs/*/};
IMAGE_TAG=${TAG_FULL//\//_};
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
- name: 'Set up Docker Buildx'
uses: docker/setup-buildx-action@v2
- name: 'Login to Docker Hub'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_REGISTRY_LOGIN }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
- name: 'Build and push'
uses: docker/build-push-action@v4
with:
push: true
tags: flipperdevices/flipper-tilda-webserver:${{steps.tag.outputs.image_tag}}