diff --git a/.github/workflows/workflow-push.yml b/.github/workflows/workflow-push.yml index 3017d0d..83fd4ea 100644 --- a/.github/workflows/workflow-push.yml +++ b/.github/workflows/workflow-push.yml @@ -203,7 +203,6 @@ jobs: VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }} scan_container_aws: - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' permissions: security-events: write needs: [commit_lint, commit_spell_check, configuration, docker_container_lint, json_schema_lint, markdown_links, markdown_lint, markdown_spelling, pre-commit_hooks, security, shell_lint, start, toml_lint, workflow_lint, yaml_lint] @@ -218,7 +217,6 @@ jobs: VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }} scan_container_cloudflare: - if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' permissions: security-events: write needs: [commit_lint, commit_spell_check, configuration, docker_container_lint, json_schema_lint, markdown_links, markdown_lint, markdown_spelling, pre-commit_hooks, security, shell_lint, start, toml_lint, workflow_lint, yaml_lint] @@ -233,7 +231,7 @@ jobs: VERBOSE_NOTIFICATIONS: ${{ fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_verbose_notifications }} push_container_aws: - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' needs: [configuration, scan_container_aws] permissions: packages: write @@ -246,12 +244,11 @@ jobs: BUILD_ARGS: | PROVIDER=aws IMAGE_NAME: "docker.io/niallbyrne/smtp-aws" - IMAGE_LATEST: true REGISTRY: "docker.io" VERBOSE_NOTIFICATIONS: true push_container_cloudflare: - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' needs: [configuration, scan_container_cloudflare] permissions: packages: write @@ -264,7 +261,6 @@ jobs: BUILD_ARGS: | PROVIDER=cloudflare IMAGE_NAME: "docker.io/niallbyrne/smtp-cloudflare" - IMAGE_LATEST: true REGISTRY: "docker.io" VERBOSE_NOTIFICATIONS: true @@ -278,29 +274,40 @@ jobs: with: JSON_APPENDED_CONTENT: ${{ toJSON(fromJSON(needs.configuration.outputs.JSON_FILE_DATA).ci_extra_release_content) }} - success_master: - if: github.ref == 'refs/heads/master' - needs: [push_container_aws, push_container_cloudflare] + release_container_aws: + needs: [configuration, create_release] + permissions: + packages: write secrets: + REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@master + uses: cicd-tools-org/cicd-tools/.github/workflows/job-95-container-push_release.yml@master with: - NOTIFICATION_EMOJI: ":checkered_flag:" - NOTIFICATION_MESSAGE: "Workflow has completed successfully!" + BUILD_ARGS: | + PROVIDER=aws + IMAGE_NAME: "docker.io/niallbyrne/smtp-aws" + REGISTRY: "docker.io" + VERBOSE_NOTIFICATIONS: true - success_dev: - if: github.ref == 'refs/heads/dev' - needs: [scan_container_aws, scan_container_cloudflare] + release_container_cloudflare: + needs: [configuration, scan_container_cloudflare] + permissions: + packages: write secrets: + REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} + REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@master + uses: cicd-tools-org/cicd-tools/.github/workflows/job-95-container-push_release.yml@master with: - NOTIFICATION_EMOJI: ":checkered_flag:" - NOTIFICATION_MESSAGE: "Workflow has completed successfully!" + BUILD_ARGS: | + PROVIDER=cloudflare + IMAGE_NAME: "docker.io/niallbyrne/smtp-cloudflare" + REGISTRY: "docker.io" + VERBOSE_NOTIFICATIONS: true - success_other: - if: github.ref != 'refs/heads/master' && github.ref != 'refs/heads/dev' - needs: [commit_lint, commit_spell_check, configuration, docker_container_lint, json_schema_lint, markdown_links, markdown_lint, markdown_spelling, pre-commit_hooks, security, shell_lint, start, toml_lint, workflow_lint, yaml_lint] + success: + needs: [scan_container_aws, scan_container_cloudflare] secrets: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} uses: cicd-tools-org/cicd-tools/.github/workflows/job-00-generic-notification.yml@master