Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: push multi image to ghcr when release #1065

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/cts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
workflow_dispatch:
schedule:
- cron: '0 */6 * * *'
push:
tags:
- "*"

jobs:
test:
Expand Down Expand Up @@ -74,7 +71,7 @@ jobs:
- uses: docker/metadata-action@v5
id: meta
with:
images: ghcr.io/${{ github.repository }}
images: ghcr.io/${{ github.repository_owner }}/emqx-operator-controller
flavor: |
latest=true
tags: |
Expand Down Expand Up @@ -136,7 +133,7 @@ jobs:
timeout-minutes: 5
uses: ./.github/actions/deploy-operator
with:
repository: ghcr.io/${{ github.repository }}
repository: ghcr.io/${{ github.repository_owner }}/emqx-operator-controller
tag: ${{ github.ref_name }}
- name: Deploy emqx
timeout-minutes: 5
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,27 @@ jobs:
fi
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ github.repository_owner }}/emqx-operator-controller
images: |
${{ github.repository_owner }}/emqx-operator-controller
ghcr.io/${{ github.repository_owner }}/emqx-operator-controller
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- uses: docker/login-action@v3
if: startsWith(github.ref, 'refs/tags/')
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64,linux/arm/v7
Expand All @@ -65,7 +71,6 @@ jobs:
echo "::set-output name=prerelease::true"
fi
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ steps.prerelease.outputs.prerelease }}
generate_release_notes: true
Expand Down