Skip to content

fix: remove unused input #2

fix: remove unused input

fix: remove unused input #2

name: Reusable GitOps with ArgoCD workflow
on:
workflow_call:
inputs:
bump:
type: choice
required: true
default: patch
options:
- patch
- minor
- major
description: Choose how you are going to bump version
image_tag_source:
required: false
type: string
default: edge
description: Image source tag
image_name:
required: true
type: string
description: Image name without tag
image_registry:
required: true
type: string
description: Image registry eg. ghcr.io or docker.io
github_repo_name:
required: true
type: string
description: GitHub repository name to create release
secrets:
github_token:

Check failure on line 33 in .github/workflows/tag-and-release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/tag-and-release.yaml

Invalid workflow file

secret name `github_token` within `workflow_call` can not be used since it would collide with system reserved name
required: true
description: GitHub token for tagging repository
registry_username:
required: true
description: Container registry username
registry_password:
required: true
description: Container registry password
jobs:
tag-and-release:
runs-on: ubuntu-latest
if: ${{ !cancelled() && !failure() }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get next semver version
id: semver
uses: anothrNick/github-tag-action@v1
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
WITH_V: true
DRY_RUN: true
DEFAULT_BUMP: ${{ inputs.bump }}
- name: Generate job summary version to tag
run: |
echo "This GitHub Actions is going to tag container image ${{ inputs.image_name }} from edge to version ${{ steps.semver.outputs.new_tag }}" >> $GITHUB_STEP_SUMMARY
- name: Login to Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ inputs.image_registry }}
username: ${{ secrets.registry_username }}
password: ${{ secrets.registry_password }}
- name: Setup Crane
uses: imjasonh/[email protected]
- name: Copy Docker Image from edge to production
run: crane copy ${{ inputs.image_name }}:${{ inputs.image_tag_source }} ${{ inputs.image_name }}:${{ steps.semver.outputs.new_tag }}
- name: Create GitHub Release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
run: |
gh release create "${{ steps.semver.outputs.new_tag }}" \
--repo="${{ inputs.github_repo_name }}" \
--title="${{ steps.semver.outputs.new_tag }}" \
--generate-notes