Skip to content

chore: update dependencies #172

chore: update dependencies

chore: update dependencies #172

Workflow file for this run

name: ci
on:
workflow_dispatch:
inputs:
dry_run:
description: 'DryRun'
required: true
default: 'true'
push:
branches:
- 'main'
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
pull_request:
branches:
- 'main'
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Test
run: make test
- name: Bump version
id: bump_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fetch_all_tags: true
dry_run: ${{ ! (github.event_name == 'push' && github.ref == 'refs/heads/main') }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
tag: ${{ steps.bump_version.outputs.new_tag }}
name: ${{ steps.bump_version.outputs.new_tag }}
generateReleaseNotes: true
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: dbonfigli/sts-phased-rollout-operator
tags: |
type=raw,value=${{ steps.bump_version.outputs.new_tag }},enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=raw,value=latest,enable=${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
type=ref,event=branch
- name: Log in to Docker Hub
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
push: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}