Skip to content

updated workflows

updated workflows #5

Workflow file for this run

name: Release
on:
push:
tags: [ 'v*.*.*' ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
deploy-arm64:
runs-on: custom-ubuntu-24.04-arm
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta-api
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-api-arm64
- name: Build and push Docker image
working-directory: ./api
id: build-and-push-amd64
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0

Check failure on line 46 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 46, Col: 9): Unexpected value 'uses' .github/workflows/release.yaml (Line: 47, Col: 9): Unexpected value 'with'
with:
context: .
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}
cache-from: type=gha
platforms: linux/arm64
cache-to: type=gha,mode=max
provenance: false
build-args: GIT_OAUTH_TOKEN=${{ secrets.GH_BUILD_PAT }}
deploy-amd64:
runs-on: custom-ubuntu-24.04
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create k8s Kind Cluster
working-directory: ./api
run: |
./kind/setup.sh
- name: Extract Docker metadata
id: meta-api
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-api-amd64
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.24.3'
- name: Test
working-directory: ./api
run: |
go test -v ./...
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
working-directory: ./api
id: build-and-push-amd64
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
context: .
push: true
tags: ${{ steps.meta-api.outputs.tags }}
labels: ${{ steps.meta-api.outputs.labels }}
cache-from: type=gha
platforms: linux/amd64
cache-to: type=gha,mode=max
provenance: false
build-args: GIT_OAUTH_TOKEN=${{ secrets.GH_BUILD_PAT }}
- name: Package and push helm chart
run: |
VERSION=${GITHUB_REF_NAME#v}
REPOSITORY=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')
sed -i "s/v0\.0\.0/v${VERSION}/g" ./charts/deploygrid/values.yaml
helm package ./charts/deploygrid --version $VERSION
helm push ./deploygrid-$VERSION.tgz oci://$REPOSITORY
create-manifests-api:
runs-on: [ custom-ubuntu-24.04 ]
needs: [deploy-amd64, deploy-arm64]
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta-api-arm64
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-api-arm64
- name: Extract Docker metadata
id: meta-api-amd64
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-api-amd64
- name: Extract Docker metadata
id: meta-api
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
flavor: |
latest=false
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Create manifest and push
run: |
docker manifest create \
${{ steps.meta.outputs.tags }} \
--amend ${{ steps.meta-api-arm64.outputs.tags }} \
--amend ${{ steps.meta-api-amd64.outputs.tags }} && \
docker manifest push ${{ steps.meta-api.outputs.tags }}