Skip to content

Commit

Permalink
use docker/setup-qemu-action (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
phyrog authored Sep 23, 2024
1 parent 04b58a7 commit a4ccb5f
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 57 deletions.
74 changes: 38 additions & 36 deletions .github/workflows/on-push-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,59 @@ name: go:pre-release

on:
push:
tags: 'v*'
tags: "v*"

jobs:
create-pre-release:
runs-on: ubuntu-latest

steps:
- name: Checkout commit
uses: actions/checkout@v4
- name: Update VERSION file
run: |-
- name: Checkout commit
uses: actions/checkout@v4
- name: Update VERSION file
run: |-
echo "${{ github.ref_name }}" > VERSION
- name: Create controller-registration.yaml
run: |-
- name: Create controller-registration.yaml
run: |-
vendor/github.com/gardener/gardener/hack/generate-controller-registration.sh shoot-kubecost charts/gardener-extension-shoot-kubecost ${{ github.ref_name }} controller-registration.yaml \
Extension:shoot-kubecost
vendor/github.com/gardener/gardener/hack/generate-controller-registration.sh shoot-kubecost charts/gardener-extension-shoot-kubecost ${{ github.ref_name }}-rc.${{ github.sha }} rc-controller-registration.yaml \
Extension:shoot-kubecost
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
body: |-
# [gardener-extension-shoot-kubecost] ${{ github.ref_name }}
prerelease: true
files: |-
- name: Create Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
body: |-
# [gardener-extension-shoot-kubecost] ${{ github.ref_name }}
prerelease: true
files: |-
controller-registration.yaml
rc-controller-registration.yaml
go-pre-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout commit
uses: actions/checkout@v4
- name: Update VERSION file
run: |-
- name: Checkout commit
uses: actions/checkout@v4
- name: Update VERSION file
run: |-
echo "${{ github.ref_name }}-rc.${{ github.sha }}" > VERSION
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/liquid-reply/gardener-extension-shoot-kubecost:${{ github.ref_name }}-rc.${{ github.sha }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/liquid-reply/gardener-extension-shoot-kubecost:${{ github.ref_name }}-rc.${{ github.sha }}
44 changes: 23 additions & 21 deletions .github/workflows/on-release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,34 @@ name: go:publish

on:
release:
types: [ released ]
types: [released]
workflow_dispatch:

jobs:
go-publish:
runs-on: ubuntu-latest

steps:
- name: Checkout commit
uses: actions/checkout@v4
- name: Update VERSION file
run: |-
- name: Checkout commit
uses: actions/checkout@v4
- name: Update VERSION file
run: |-
echo "${{ github.ref_name }}" > VERSION
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/liquid-reply/gardener-extension-shoot-kubecost:latest
ghcr.io/liquid-reply/gardener-extension-shoot-kubecost:${{ github.ref_name }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish image
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/liquid-reply/gardener-extension-shoot-kubecost:latest
ghcr.io/liquid-reply/gardener-extension-shoot-kubecost:${{ github.ref_name }}

0 comments on commit a4ccb5f

Please sign in to comment.