generated from IQTLabs/edgetech-template
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.17 KB
/
release-tag.yaml
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
name: Release Tagging
on:
release:
types: [ "published" ]
jobs:
push_to_registry:
name: Dockerhub Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set DOCKER_FOLDER
run: echo "DOCKER_FOLDER=$(echo ${{ github.event.repository.name }} | sed 's/edgetech-//')" >> $GITHUB_ENV
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ${{ env.DOCKER_FOLDER }}
platforms: linux/arm64,linux/amd64
push: true
tags: |
${{ vars.DOCKER_NAMESPACE }}/${{ github.event.repository.name }}:${{ github.event.release.name }}
${{ vars.DOCKER_NAMESPACE }}/${{ github.event.repository.name }}:stable
${{ vars.DOCKER_NAMESPACE }}/${{ github.event.repository.name }}:latest