-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (42 loc) · 1.49 KB
/
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
36
37
38
39
40
41
42
43
44
name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- uses: docker/build-push-action@v6
with:
sbom: true
push: true
provenance: mode=max
build-args: |
VERSION=${{ env.VERSION }}
tags: frourio/magnito:${{ env.VERSION }},frourio/magnito:latest
platforms: linux/amd64,linux/arm64
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- env:
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: i9v2y6d7
REPOSITORY: magnito
IMAGE_TAG: ${{ env.VERSION }}
run: docker buildx build --platform linux/amd64,linux/arm64 --build-arg VERSION=$IMAGE_TAG -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:latest --push .