Skip to content

Commit

Permalink
Test ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
epot committed Jun 3, 2024
1 parent 8be9c6a commit 75d9908
Showing 1 changed file with 5 additions and 49 deletions.
54 changes: 5 additions & 49 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,6 @@ on:
- 'v*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:

- name: Check Out Repo
uses: actions/checkout@v4

- name: Free up some disk space on ubuntu
if: ${{ runner.os == 'Linux' }}
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
check-latest: true

- name: Release Notes
run: ./resources/scripts/release_notes.sh > ./release_notes.md

- name: GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --release-notes=./release_notes.md --timeout 120m
env:
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

docker:
runs-on: ubuntu-latest
permissions:
Expand All @@ -60,25 +26,15 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Log in to registry
run: echo "${{ secrets.GH_ACCESS_TOKEN }}" | docker login ghcr.io -u $ --password-stdin

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public

- name: Install Buildx
id: buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -88,7 +44,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
public.ecr.aws/q3y3o3o4/warpstream_bento
ghcr.io/${{ github.repository_owner }}/bento
flavor: |
latest=auto
suffix=-cgo
Expand All @@ -110,7 +66,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
public.ecr.aws/q3y3o3o4/warpstream_bento
ghcr.io/${{ github.repository_owner }}/bento
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand Down

0 comments on commit 75d9908

Please sign in to comment.