Skip to content

Commit

Permalink
Updates to Actions
Browse files Browse the repository at this point in the history
- Remove single-arch duplicated image building
- Fix CodeQL action
- Stale issues now "unstale" after activity
  • Loading branch information
Zerpet committed Oct 31, 2024
1 parent fe8c115 commit 467b38e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 98 deletions.
86 changes: 2 additions & 84 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
check-latest: true

- name: OCI Metadata for multi-arch image
- name: OCI Metadata
id: meta
uses: docker/metadata-action@v5
with:
Expand Down Expand Up @@ -213,88 +213,6 @@ jobs:
retention-days: 2
if-no-files-found: error

build_operator_single_arch_amd64:
name: Build single-arch AMD64 image
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
needs: unit_integration_tests
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: OCI Metadata for single-arch amd64 image
id: single-arch-meta-amd64
uses: docker/metadata-action@v5
with:
images: |
rabbitmqoperator/cluster-operator
flavor: |
latest=false
tags: |
type=semver,pattern={{version}},suffix=-amd64,latest=false
- name: Build and push single-arch amd64 image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
provenance: false
push: true
tags: ${{ steps.single-arch-meta-amd64.outputs.tags }}
labels: ${{ steps.single-arch-meta-amd64.outputs.labels }}

build_operator_single_arch_arm64:
name: Build single-arch ARM64 image
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
needs: unit_integration_tests
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

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

- name: OCI Metadata for single-arch arm64 image
id: single-arch-meta-arm64
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
rabbitmqoperator/cluster-operator
flavor: |
latest=false
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}},suffix=-arm64,latest=false
type=sha,suffix=-arm64,latest=false
- name: Build and push single-arch arm64 image
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/arm64
provenance: false
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.single-arch-meta-arm64.outputs.tags }}
labels: ${{ steps.single-arch-meta-arm64.outputs.labels }}

system_tests:
name: Local system tests (stable k8s)
runs-on: ubuntu-latest
Expand Down Expand Up @@ -571,7 +489,7 @@ jobs:
name: release-header

- name: Release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
jobs:
analyze:
name: Analyze
if: ${{ github.actor != 'dependabot[bot]' || github.event_name == "pull_request" }}
if: ${{ github.actor != 'dependabot[bot]' || github.event_name == 'pull_request' }}
runs-on: ubuntu-latest

strategy:
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,5 @@ jobs:
close-pr-label: "closed-stale"
# The labels to apply when a pull request is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2")
exempt-pr-labels: "never-stale"
# Only issues or pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels.
only-labels: # optional, default is
# The maximum number of operations per run, used to control rate limiting.
# operations-per-run: # optional, default is 30
# Remove stale labels from issues when they are updated or commented on.
remove-stale-when-updated: false
# Run the processor in debug mode without actually performing any operations on live issues.
debug-only: false
# The order to get issues or pull requests. Defaults to false, which is descending
# ascending: # optional
# Skip adding stale message when marking a pull request as stale.
# skip-stale-pr-message: # optional
# Skip adding stale message when marking an issue as stale.
# skip-stale-issue-message: # optional
remove-stale-when-updated: true

0 comments on commit 467b38e

Please sign in to comment.