solvaholic / octodns-sync

GitHub Action to test and deploy DNS settings with OctoDNS
MIT License
28 stars 14 forks source link

Running @branch may not pull the :branch image #32

Closed solvaholic closed 3 years ago

solvaholic commented 3 years ago

What I did

  1. Pushed changes to solvaholic/octodns-sync:branchX
  2. Configured workflow in a different repo to run solvaholic/octodns-sync@branchX.

What I expected to happen

octodns-sync pulled the :branchX Docker image and used that.

What happened instead

octodns-sync pulled the :latest Docker image and used that.

This happened because I did not modify action.yml in branchX to pull the desired image.

Additional info

I'd like to:

When everything is checked ☝️ this is considered done.


For posterity: Over in solvaholic/scaling-succotash I tried having a composite Action pull and run the Docker container (rather than use a docker Action). That way I was able to docker run an arbitrary tag, using version :${{ github.sha }}.

This worked, inasmuch as it ran the container's entrypoint. But I did not see a straightforward way to get the user's environment variables into the running container where octodns-sync could use them.

https://github.com/solvaholic/scaling-succotash/blob/8a3a17433113065bf7b13cc10f40c4e51848534c/action.yml

solvaholic commented 3 years ago
  • [ ] On every push to main or a version tag, build and push container with version :${{ github.sha }}
  • [ ] When build-push-test is run manually, build and push container with version :${{ github.sha }}
  • [ ] When run for a branch, or a version tag, push corresponding image tags/versions

I tested changes for these over in:

https://github.com/solvaholic/scaling-succotash/blob/4b0d9694f62ef2091844123621f226d28e882547/.github/workflows/docker.yml

solvaholic commented 3 years ago
  • [ ] Clarify in doc: Using @branchX in a workflow will pull the Docker image named in that branch's action.yml
  • [ ] Provide instructions to modify action.yml when user would like to test changes, using a workflow

These two I'll skip for now, since only one user can make branches in this repo. When I come back to it I'll document how to test changes to the Action using a fork.

  • [ ] When a branch is deleted, automatically remove its corresponding Docker image tags
  • [ ] Automatically remove SHA-based image tags after some number of days

Currently, that I can see, GitHub's APIs do not provide the ability to programmatically delete a published container.

solvaholic commented 3 years ago

I guess this issue isn't solved really. I've done all I plan to do with it just now, though, so I'll close it.