Skip to content

Relocate GitHub Actions reusable workflows

Affected versions

GitHub Actions reusable workflows from the reusable-workflows repository.

Docker build and push have relocated to reusable-docker-build-push.

Terraform plan and apply have relocated to reusable-terraform-plan-apply.

Rationale

The workflows have been relocated to their own repositories to make it possible to version them independently. This increases the stability of the workflows and makes it easier to update them.

Step 1: Check where the workflows are used

The workflows are most likely used in your application and infrastructure repositories. To get an overview, you can search for the workflows across all repositories in the Oslo kommune organization.

Step 2: Relocate the workflows

Relocate the reusable workflows to the new ones by editing the files you located in the previous step. Check out the diffs below to figure out how it should be done.

Example diff for terraform_plan_apply.yml:

-    uses: oslokommune/reusable-workflows/.github/workflows/terraform_plan_apply.yml@main
+    uses: oslokommune/reusable-terraform-plan-apply/.github/workflows/reusable-terraform-plan-apply.yml@2eb1a247067276f253e22ac667750f0b33500ea7 # v1.0.0

Example diff for docker_build_push.yml:

-    uses: oslokommune/reusable-workflows/.github/workflows/docker_build_push.yml@main
+    uses: oslokommune/reusable-docker-build-push/.github/workflows/reusable-docker-build-push.yml@a264996adcc011a0792599e5ad71680ec0b0b310 # v1.0.0

Step 3: Configure Dependabot (optional)

Configure Dependabot to receive automatic updates to the workflows.

Open .github/dependabot.yml and add the following:

version: 2

updates:

  - package-ecosystem: "github-actions"
    directory: "/" # This should be / rather than .github/workflows
    schedule:
      interval: "daily"
    allow: # (1)!
      - dependency-name: "oslokommune/*"
  1. Remove the allow key if you want to receive updates for all GitHub Actions dependencies.