-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (46 loc) · 1.8 KB
/
release-branch-saphe.yaml
File metadata and controls
47 lines (46 loc) · 1.8 KB
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
41
42
43
44
45
46
47
name: release-branch-saphe
on:
workflow_dispatch:
inputs:
branch:
description: "Branch name"
required: true
default: "dev-0-1-0-separate-saphe-from-satysfi"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v4
- uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-branch-${{ github.event.inputs.branch }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-branch-${{ github.event.inputs.branch }}-
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
- id: args
run: |
echo "date=$(date --iso-8601=seconds)" >> $GITHUB_OUTPUT
echo "version=$(date --iso-8601=date)-${{ github.event.inputs.branch }}" >> $GITHUB_OUTPUT
echo "revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "image_tag=branch-${{ github.event.inputs.branch }}" >> $GITHUB_OUTPUT
- uses: docker/build-push-action@v6
with:
context: branch-saphe
file: branch-saphe/Dockerfile
push: true
tags: amutake/satysfi:${{ steps.args.outputs.image_tag }}
build-args: |
BUILD_DATE=${{ steps.args.outputs.date }}
VERSION=${{ steps.args.outputs.version }}
REVISION=${{ steps.args.outputs.revision }}
BRANCH=${{ github.event.inputs.branch }}
IMAGE_TAG=${{ steps.args.outputs.image_tag }}
platforms: linux/amd64,linux/arm64
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache