-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (46 loc) · 1.28 KB
/
docker-release.yml
File metadata and controls
54 lines (46 loc) · 1.28 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
48
49
50
51
52
53
54
name: Build and Release Docker Container
on:
push:
tags:
- 'v*'
jobs:
build-and-push:
name: Build and Push CLI Container
runs-on: depot-ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Extract version from tag
id: extract_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
- name: Login to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: depot/use-action@v1.3.1
with:
project: xnsnw3m20t
- name: Build and push container
uses: depot/build-push-action@v1.17.0
id: build
with:
project: xnsnw3m20t
context: .
file: ./Dockerfile
sbom: true
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/overmindtech/cli:latest
ghcr.io/overmindtech/cli:${{ steps.extract_version.outputs.version }}