diff --git a/.github/workflows/bump-version.yaml b/.github/workflows/bump-version.yaml index 4202392..1ff6ae8 100644 --- a/.github/workflows/bump-version.yaml +++ b/.github/workflows/bump-version.yaml @@ -13,7 +13,7 @@ jobs: git-token: ${{ secrets.GITHUB_TOKEN }} fail: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest if: github.event.action == 'failure' steps: - name: Exit with error diff --git a/.github/workflows/internal-cd.yaml b/.github/workflows/internal-cd.yaml index 1748ec8..2c1ebb9 100644 --- a/.github/workflows/internal-cd.yaml +++ b/.github/workflows/internal-cd.yaml @@ -18,7 +18,7 @@ jobs: generate-minor: false trigger-p2p-build: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest needs: [internal-version] env: ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} diff --git a/.github/workflows/internal-ci.yaml b/.github/workflows/internal-ci.yaml index c1d001d..a15bce4 100644 --- a/.github/workflows/internal-ci.yaml +++ b/.github/workflows/internal-ci.yaml @@ -14,7 +14,7 @@ jobs: dry-run: true print-version: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest needs: increment-version steps: - env: @@ -36,7 +36,7 @@ jobs: with: dry-run: true uses: ./.github/workflows/p2p-version.yaml - + test_execute_command: needs: [test_version] uses: ./.github/workflows/p2p-execute-command.yaml @@ -70,7 +70,7 @@ jobs: test_extended_test: uses: ./.github/workflows/p2p-workflow-extended-test.yaml - needs: [get_image_extended_test] + needs: [get_image_extended_test] secrets: env_vars: | TEST_VARIABLE=value diff --git a/.github/workflows/internal-version.yaml b/.github/workflows/internal-version.yaml index a582d6c..227686f 100644 --- a/.github/workflows/internal-version.yaml +++ b/.github/workflows/internal-version.yaml @@ -1,3 +1,4 @@ + name: increment-version on: @@ -26,25 +27,25 @@ on: jobs: increment-version: name: increment-version - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest outputs: version: ${{ steps.setversion.outputs.patch }} - + steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - name: Configure Git run: | git config user.name "$GITHUB_ACTOR" - git config user.email "$GITHUB_ACTOR@users.noreply.github.com" - + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + - name: Get Previous tag id: previoustag shell: bash run: | - git tag | sort -r --version-sort | head -n1 - echo "tag=$(git tag | sort -r --version-sort | head -n1)" >> "$GITHUB_OUTPUT" + git tag | sort -r --version-sort | head -n1 + echo "tag=$(git tag | sort -r --version-sort | head -n1)" >> "$GITHUB_OUTPUT" env: GITHUB_TOKEN: ${{ secrets.git-token }} @@ -58,7 +59,7 @@ jobs: id: semvers uses: "WyriHaximus/github-action-next-semvers@v1" with: - version: ${{ inputs.override != '' && inputs.override || steps.previousversion.outputs.version }} + version: ${{ inputs.override != '' && inputs.override || steps.previousversion.outputs.version }} - name: Set bumped version in output id: setversion @@ -67,6 +68,7 @@ jobs: echo "patch=${{ steps.semvers.outputs.patch }}" >> "$GITHUB_OUTPUT" echo "minor=${{ steps.semvers.outputs.patch }}" | cut -d. -f1,2 >> "$GITHUB_OUTPUT" echo "major=${{ steps.semvers.outputs.patch }}" | cut -d. -f1 >> "$GITHUB_OUTPUT" + - name: Show the tags shell: bash @@ -98,3 +100,4 @@ jobs: with: tag: v${{ steps.setversion.outputs.patch }} tag_exists_error: true + diff --git a/.github/workflows/p2p-execute-command.yaml b/.github/workflows/p2p-execute-command.yaml index 71cad6b..8f620b6 100644 --- a/.github/workflows/p2p-execute-command.yaml +++ b/.github/workflows/p2p-execute-command.yaml @@ -50,10 +50,11 @@ on: type: string default: '.' + jobs: exec: name: '${{ inputs.command }} (${{ inputs.github_env }})' - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest environment: ${{ inputs.github_env }} env: env_vars: ${{ secrets.env_vars }} @@ -86,10 +87,10 @@ jobs: if: ${{ inputs.optional == true }} working-directory: ${{ inputs.working-directory }} id: is_optional - run: | + run: | declare -r optional_target=${{ inputs.command }} # match target in format: `.PHONY: `, skip if commented out - if grep "^[^#]*.PHONY.*${optional_target}.*" ./Makefile; then + if grep "^[^#]*.PHONY.*${optional_target}.*" ./Makefile; then echo "SKIP=false" >> $GITHUB_ENV else echo "WARNING: No Makefile target [$optional_target], skipping job" @@ -145,7 +146,7 @@ jobs: done - name: Install iapc - uses: jaxxstorm/action-install-gh-release@v1 + uses: jaxxstorm/action-install-gh-release@v1.10.0 with: repo: cedws/iapc tag: v0.1.9 diff --git a/.github/workflows/p2p-get-latest-image-extended-test.yaml b/.github/workflows/p2p-get-latest-image-extended-test.yaml index f32d126..33487a1 100644 --- a/.github/workflows/p2p-get-latest-image-extended-test.yaml +++ b/.github/workflows/p2p-get-latest-image-extended-test.yaml @@ -1,3 +1,4 @@ + on: workflow_call: secrets: diff --git a/.github/workflows/p2p-get-latest-image-prod.yaml b/.github/workflows/p2p-get-latest-image-prod.yaml index 7576e3a..43e2196 100644 --- a/.github/workflows/p2p-get-latest-image-prod.yaml +++ b/.github/workflows/p2p-get-latest-image-prod.yaml @@ -1,3 +1,4 @@ + on: workflow_call: secrets: diff --git a/.github/workflows/p2p-get-latest-image.yaml b/.github/workflows/p2p-get-latest-image.yaml index 3d36459..352defe 100644 --- a/.github/workflows/p2p-get-latest-image.yaml +++ b/.github/workflows/p2p-get-latest-image.yaml @@ -33,10 +33,11 @@ on: required: true type: string + jobs: get-latest-image: name: get-latest-image - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest outputs: version: ${{ steps.get-latest-image.outputs.version }} environment: ${{ fromJson(inputs.environment).include[0]['deploy_env'] }} @@ -83,6 +84,6 @@ jobs: working-directory: ${{ inputs.working-directory }} run: | [ $DRY_RUN == false ] && version=$(gcloud container images list-tags ${REGISTRY}/${REGISTRY_PATH}/${IMAGE_NAME} --limit=1 --format=json ) - [ $? -gt 0 ] && [ $DRY_RUN == false ] && echo "exiting" && exit 1 + [ $? -gt 0 ] && [ $DRY_RUN == false ] && echo "exiting" && exit 1 [ $DRY_RUN == true ] && version="[{\"tags\": [\"0.0.0\"]}]" echo "version=$(echo ${version} | jq -r '.[0].tags[0]')" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/p2p-promote-image.yaml b/.github/workflows/p2p-promote-image.yaml index 2e76a1d..6a838b9 100644 --- a/.github/workflows/p2p-promote-image.yaml +++ b/.github/workflows/p2p-promote-image.yaml @@ -46,9 +46,10 @@ on: required: false type: string + jobs: lookup: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest environment: ${{ fromJson(inputs.source_matrix).include[0]['deploy_env'] }} env: REGISTRY: ${{ inputs.region }}-docker.pkg.dev/${{ vars.PROJECT_ID }}/tenant/${{ vars.TENANT_NAME }} @@ -67,7 +68,7 @@ jobs: promote-image: name: promote-to-${{ inputs.promotion-stage }} - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest needs: [lookup] environment: ${{ inputs.dest_github_env }} env: @@ -98,7 +99,7 @@ jobs: yq -p=json -C <> "$GITHUB_OUTPUT" + echo "tag=$PREVIOUS_VERSION" >> "$GITHUB_OUTPUT" + - name: get previous version from tag id: previousversion @@ -72,7 +74,7 @@ jobs: id: semvers uses: "WyriHaximus/github-action-next-semvers@v1" with: - version: ${{ steps.previousversion.outputs.version }} + version: ${{ steps.previousversion.outputs.version }} - name: get git hashes id: githashes @@ -108,7 +110,7 @@ jobs: TAG=${{ steps.semvers.outputs.patch }} PREVIOUS_TAG=${{ steps.previousversion.outputs.version }} - + HASH=${{ steps.githashes.outputs.current_hash }} LAST_TAG_HASH=${{ steps.githashes.outputs.previous_tag_hash }} diff --git a/.github/workflows/p2p-workflow-extended-test.yaml b/.github/workflows/p2p-workflow-extended-test.yaml index 512ab87..1ca29cc 100644 --- a/.github/workflows/p2p-workflow-extended-test.yaml +++ b/.github/workflows/p2p-workflow-extended-test.yaml @@ -1,3 +1,4 @@ + on: workflow_call: secrets: @@ -40,7 +41,7 @@ on: type: string env: - REGION: ${{ inputs.region }} + REGION: ${{ inputs.region }} jobs: run-tests: diff --git a/.github/workflows/p2p-workflow-fastfeedback.yaml b/.github/workflows/p2p-workflow-fastfeedback.yaml index ad90605..ff3c811 100644 --- a/.github/workflows/p2p-workflow-fastfeedback.yaml +++ b/.github/workflows/p2p-workflow-fastfeedback.yaml @@ -1,3 +1,4 @@ + on: workflow_call: secrets: @@ -16,7 +17,7 @@ on: required: false type: string default: '' - version: + version: required: true type: string region: @@ -42,8 +43,9 @@ on: version: value: ${{ inputs.version }} + env: - REGION: ${{ inputs.region }} + REGION: ${{ inputs.region }} jobs: build: @@ -130,3 +132,5 @@ jobs: working-directory: ${{ inputs.working-directory }} connect-to-k8s: true corectl-version: ${{ inputs.corectl-version }} + + diff --git a/.github/workflows/p2p-workflow-prod.yaml b/.github/workflows/p2p-workflow-prod.yaml index 8682396..222aec0 100644 --- a/.github/workflows/p2p-workflow-prod.yaml +++ b/.github/workflows/p2p-workflow-prod.yaml @@ -1,3 +1,4 @@ + on: workflow_call: secrets: @@ -29,6 +30,7 @@ on: type: string default: 'v' + jobs: prod-deploy: name: prod-deploy @@ -46,3 +48,5 @@ jobs: dry-run: ${{ inputs.dry-run }} working-directory: ${{ inputs.working-directory }} checkout-version: ${{ inputs.version-prefix }}${{ inputs.version }} + +