{"id":19797553,"url":"https://github.com/aplinkosministerija/reusable-workflows","last_synced_at":"2026-02-17T03:07:39.927Z","repository":{"id":161473372,"uuid":"631302607","full_name":"AplinkosMinisterija/reusable-workflows","owner":"AplinkosMinisterija","description":"Reusable workflows for developing GitHub actions","archived":false,"fork":false,"pushed_at":"2024-06-13T10:03:53.000Z","size":288,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-13T12:56:10.116Z","etag":null,"topics":["github-actions","reusable-workflows"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AplinkosMinisterija.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-22T15:35:48.000Z","updated_at":"2024-06-13T10:03:57.000Z","dependencies_parsed_at":"2024-02-14T10:43:06.333Z","dependency_job_id":"b2854347-4f84-42a6-a821-fc0f39294c33","html_url":"https://github.com/AplinkosMinisterija/reusable-workflows","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplinkosMinisterija%2Freusable-workflows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplinkosMinisterija%2Freusable-workflows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplinkosMinisterija%2Freusable-workflows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AplinkosMinisterija%2Freusable-workflows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AplinkosMinisterija","download_url":"https://codeload.github.com/AplinkosMinisterija/reusable-workflows/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224233922,"owners_count":17277866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","reusable-workflows"],"created_at":"2024-11-12T07:25:49.606Z","updated_at":"2026-02-17T03:07:39.901Z","avatar_url":"https://github.com/AplinkosMinisterija.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reusable Workflows for Developing GitHub Actions\n\nThe repository contains [reusable workflows](https://docs.github.com/en/actions/using-workflows/reusing-workflows) and\nprovides a collection of workflow templates that facilitate the development of GitHub actions across several\nrepositories.\n\n## Background\n\nThese workflows are designed to help streamline common development tasks, such as building and testing code, deploying\napplications. By using reusable workflows, developers can save time and effort by avoiding\nthe need to recreate the same workflows across multiple repositories. Additionally, the repository includes\ndocumentation and best practices for creating and sharing reusable workflows.\n\n## Available workflows\n\n### Build \u0026 push docker image\n\nThis workflow automates the building, tagging, and pushing of Docker images to GitHub's Container Registry.\n\n#### Usage\n\n```yaml\ndocker-build-push:\n  uses: AplinkosMinisterija/reusable-workflows/.github/workflows/docker-build-push.yml@main\n  with:\n    docker-image: ghcr.io/AplinkosMinisterija/example-monorepo\n    docker-context: backend\n    environment: production\n    runs-on: ubuntu-latest\n    docker-platforms: 'linux/amd64,linux/arm64'\n    latest-tag: true\n    git-ref: 1084a50\n    push: true\n```\n\nFor additional information\nsee [docker-build-push.yml](https://github.com/AplinkosMinisterija/reusable-workflows/blob/main/.github/workflows/docker-build-push.yml)\n\n## Using workflows in real-life\n\n### Continuous deployment\n\nTo ensure continuous deployment in a real-world scenario, I would like to create workflows that:\n\n- Utilize [Trunk-based development](https://trunkbaseddevelopment.com/) as a version control management practice.\n- Have three environments:\n    - Development, used for testing non-production ready features.\n    - Staging, which always points to the `main` branch.\n    - Production which deploys after\n      publishing [new release in GitHub](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository)\n      and uses [Semantic Versioning](https://semver.org/).\n- Include caching to speed up the process.\n- Be able to push\n  to [GitHub Container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)\n  with meaningful image tags.\n- Build a multi-arch image that supports AMD64 and ARM64 architectures.\n\n#### Examples\n\n\u003cdetails open\u003e\n    \u003csummary\u003edeploy-development.yml\u003c/summary\u003e\n\n```yaml\nname: Deploy to Development\n\non:\n  workflow_dispatch:\n    inputs:\n      git-ref:\n        description: Git Ref (Optional)\n        required: false\n\nconcurrency: deploy-to-development\n\njobs:\n  docker-build-push:\n    name: Build \u0026 push docker image\n    uses: AplinkosMinisterija/reusable-workflows/.github/workflows/docker-build-push.yml@main\n    with:\n      docker-image: ghcr.io/aplinkosministerija/example-monorepo\n      docker-context: backend\n      environment: development\n      runs-on: ubuntu-latest\n      git-ref: ${{ github.event.inputs.git-ref }}\n      push: true\n\n  deploy:\n    name: My Deployment\n    needs: [ docker-build-push ]\n    runs-on: ubuntu-latest\n\n    steps:\n      - run: echo \"TODO\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003edeploy-staging.yml\u003c/summary\u003e\n\n```yaml\nname: Deploy to Staging\n\non:\n  push:\n    branches: [ main ]\n\nconcurrency: deploy-to-staging\n\njobs:\n  docker-build-push:\n    name: Build \u0026 push docker image\n    uses: AplinkosMinisterija/reusable-workflows/.github/workflows/docker-build-push.yml@main\n    with:\n      docker-image: ghcr.io/aplinkosministerija/example-monorepo\n      docker-context: backend\n      environment: staging\n      runs-on: ubuntu-latest\n      push: true\n\n  deploy:\n    name: My Deployment\n    needs: [ docker-build-push ]\n    runs-on: ubuntu-latest\n\n    steps:\n      - run: echo \"TODO\"\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n    \u003csummary\u003edeploy-production.yml\u003c/summary\u003e\n\n```yaml\nname: Deploy to Production\n\non:\n  push:\n    tags:\n      - 'v[0-9]+.[0-9]+.[0-9]+'\n\nconcurrency: deploy-to-production\n\njobs:\n  docker-build-push:\n    name: Build \u0026 push docker image\n    uses: AplinkosMinisterija/reusable-workflows/.github/workflows/docker-build-push.yml@main\n    with:\n      docker-image: ghcr.io/aplinkosministerija/example-monorepo\n      docker-context: backend\n      environment: production\n      runs-on: ubuntu-latest\n      latest-tag: true\n      push: true\n\n  deploy:\n    name: My Deployment\n    needs: [ docker-build-push ]\n    runs-on: ubuntu-latest\n\n    steps:\n      - run: echo \"TODO\"\n```\n\n\u003c/details\u003e\n\n## Inspiration\n\nThe inspiration behind this project comes\nfrom [actions/reusable-workflows](https://github.com/actions/reusable-workflows).\n\n## License\n\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n\n## Contributing\n\nContributions are welcome! See [Contributor's Guide](CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faplinkosministerija%2Freusable-workflows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faplinkosministerija%2Freusable-workflows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faplinkosministerija%2Freusable-workflows/lists"}