Skip to content

Add correct permission #28

Add correct permission

Add correct permission #28

Workflow file for this run

name: Build and Release
on:
push:
workflow_dispatch:
jobs:
build:
name: Release
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "~1.21.3"
- uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- uses: docker/setup-buildx-action@v3
- uses: anchore/sbom-action/[email protected]
- name: Cache tools
uses: actions/cache@v4
with:
path: .tools
key: release-tools-${{ runner.os }}-${{ hashFiles('internal/tools/go.sum') }}
- name: Touch tools
run: |
mkdir -p .tools
touch .tools/*
- name: Login to GitHub Package Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: us-east-1
- name: Login to Amazon ECR
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- name: Create release for version tag
run: make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}