Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add secret-envs input #980

Merged
merged 2 commits into from
Oct 12, 2023
Merged

feat: add secret-envs input #980

merged 2 commits into from
Oct 12, 2023

Conversation

elias-lundgren
Copy link
Contributor

Makes use of implementation in docker/actions-toolkit@a1ffbe9 and the fix in docker/actions-toolkit#176.

A new version of the npm package (@docker/actions-toolkit) with the fix implemented in the pull request has to be released before this can be merged as I understand it.

That version should be bumped in package-lock.json/package.json as well but I don't know if dependabot or me should do it.

@elias-lundgren
Copy link
Contributor Author

@crazy-max bumped the toolkit to the rc ;)

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you forgot to run docker buildx bake pre-checkin.

Also can you add a test in

describe('getArgs', () => {

I was also wondering if we should check for secret id collision but can be a follow-up.

README.md Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
@elias-lundgren
Copy link
Contributor Author

It seems you forgot to run docker buildx bake pre-checkin.

Also can you add a test in

describe('getArgs', () => {

I was also wondering if we should check for secret id collision but can be a follow-up.

I added some tests that passed here: https://github.com/docker/build-push-action/pull/980/files#diff-35112c3ed4be2816f18f19320c9c2e1fd2d10fede1dbd6ee023d75fe963ea722R622-R664 not sure if they are enough though. Also baked it as you said :)

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing input in action.yml.

Also squash your commits similar to https://github.com/docker/build-push-action/pull/957/commits. Thanks.

@elias-lundgren
Copy link
Contributor Author

Missing input in action.yml.

Also squash your commits similar to https://github.com/docker/build-push-action/pull/957/commits. Thanks.

Not sure what you mean with the missing input as it is added here:

secret-envs:
description: "List of secrets to expose to the build using environment variables (e.g., MY_SECRET=MY_ENV_VAR)"
required: false

I will squash the commits :)

@crazy-max
Copy link
Member

Not sure what you mean with the missing input as it is added here:

Sorry I'm blind 😅

I will squash the commits :)

🙏

@elias-lundgren
Copy link
Contributor Author

There we go, hope it's good!

@crazy-max crazy-max changed the title feat: add env-secrets input feat: add secret-envs input Oct 11, 2023
@crazy-max
Copy link
Member

crazy-max commented Oct 11, 2023

There we go, hope it's good!

image

Sorry for the misunderstanding but I was expected two commits:

  • feat: add secret-envs input
  • chore: update generated content that is just the result of docker buildx bake pre-checkin in ./dist like ec39ef3 as this is just generated content. See the history.

I have renamed your PR title so we are aligned.

Signed-off-by: Elias Lundgren <145569914+elias-lundgren@users.noreply.github.com>
Signed-off-by: Elias Lundgren <145569914+elias-lundgren@users.noreply.github.com>
@elias-lundgren
Copy link
Contributor Author

There we go, hope it's good!

image

Sorry for the misunderstanding but I was expected two commits:

  • feat: add secret-envs input
  • chore: update generated content that is just the result of docker buildx bake pre-checkin in ./dist like ec39ef3 as this is just generated content. See the history.

I have renamed your PR title so we are aligned.

No worries! Hopefully it's right this time.

The actions-toolkit is still on the rc.1, just wanted that known :)

@crazy-max
Copy link
Member

The actions-toolkit is still on the rc.1, just wanted that known :)

Yes that's fine!

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@crazy-max crazy-max merged commit c544b50 into docker:master Oct 12, 2023
51 checks passed
@elias-lundgren
Copy link
Contributor Author

Thank you!

montekki pushed a commit to matter-labs/zksync-withdrawal-finalizer that referenced this pull request Nov 17, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[docker/build-push-action](https://togithub.com/docker/build-push-action)
| action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>docker/build-push-action (docker/build-push-action)</summary>

###
[`v5.1.0`](https://togithub.com/docker/build-push-action/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

- Add `annotations` input by
[@&#8203;crazy-max](https://togithub.com/crazy-max) in
[docker/build-push-action#992
- Add `secret-envs` input by
[@&#8203;elias-lundgren](https://togithub.com/elias-lundgren) in
[docker/build-push-action#980
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.17.3 to 7.23.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[docker/build-push-action#991
- Bump
[@&#8203;docker/actions-toolkit](https://togithub.com/docker/actions-toolkit)
from 0.13.0-rc.1 to 0.14.0 in
[docker/build-push-action#990
[docker/build-push-action#1006

**Full Changelog**:
docker/build-push-action@v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/matter-labs/zksync-withdrawal-finalizer).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to 4m-mazi/gh-test that referenced this pull request Nov 17, 2023
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[docker/build-push-action](https://togithub.com/docker/build-push-action)
| action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>docker/build-push-action (docker/build-push-action)</summary>

###
[`v5.1.0`](https://togithub.com/docker/build-push-action/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

- Add `annotations` input by
[@&#8203;crazy-max](https://togithub.com/crazy-max) in
[docker/build-push-action#992
- Add `secret-envs` input by
[@&#8203;elias-lundgren](https://togithub.com/elias-lundgren) in
[docker/build-push-action#980
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.17.3 to 7.23.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[docker/build-push-action#991
- Bump
[@&#8203;docker/actions-toolkit](https://togithub.com/docker/actions-toolkit)
from 0.13.0-rc.1 to 0.14.0 in
[docker/build-push-action#990
[docker/build-push-action#1006

**Full Changelog**:
docker/build-push-action@v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Mogyuchi/gh-test).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
arnfinn pushed a commit to Rapporteket/docker that referenced this pull request Jan 5, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[docker/build-push-action](https://togithub.com/docker/build-push-action)
| action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>docker/build-push-action (docker/build-push-action)</summary>

###
[`v5.1.0`](https://togithub.com/docker/build-push-action/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

- Add `annotations` input by
[@&#8203;crazy-max](https://togithub.com/crazy-max) in
[docker/build-push-action#992
- Add `secret-envs` input by
[@&#8203;elias-lundgren](https://togithub.com/elias-lundgren) in
[docker/build-push-action#980
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.17.3 to 7.23.2 in
[docker/build-push-action#991
- Bump
[@&#8203;docker/actions-toolkit](https://togithub.com/docker/actions-toolkit)
from 0.13.0-rc.1 to 0.14.0 in
[docker/build-push-action#990
[docker/build-push-action#1006

**Full Changelog**:
docker/build-push-action@v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Rapporteket/docker).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@bendavies
Copy link

how exactly does this differ from secrets?

@elias-lundgren
Copy link
Contributor Author

how exactly does this differ from secrets?

@bendavies the secrets input takes in a list of key value pairs which are then provided as secrets to the docker build command by first writing the value to disk and referencing it, this can be seen in resolveBuildSecretString which then calls resolveBuildSecret. The generated argument becomes --secret id=KEY,src=<temp-file-with-secret-value>.

secret-envs instead uses resolveBuildSecretEnv and generates the argument --secret id=KEY,env=ENVIRONMENT_VARIABLE which in turn uses the ENVIRONMENT_VARIABLE defined on the GitHub runner as the secret value provided to the build.

naa0yama pushed a commit to naa0yama/OpenWrt-FortiGate-50E-custom-image that referenced this pull request Feb 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/checkout](https://togithub.com/actions/checkout) | action |
minor | `v4.0.0` -> `v4.1.1` |
|
[docker/build-push-action](https://togithub.com/docker/build-push-action)
| action | minor | `v5.0.0` -> `v5.1.0` |

---

### Release Notes

<details>
<summary>actions/checkout (actions/checkout)</summary>

###
[`v4.1.1`](https://togithub.com/actions/checkout/releases/tag/v4.1.1)

[Compare
Source](https://togithub.com/actions/checkout/compare/v4.1.0...v4.1.1)

##### What's Changed

- Update CODEOWNERS to Launch team by
[@&#8203;joshmgross](https://togithub.com/joshmgross) in
[actions/checkout#1510
- Correct link to GitHub Docs by
[@&#8203;peterbe](https://togithub.com/peterbe) in
[actions/checkout#1511
- Link to release page from what's new section by
[@&#8203;cory-miller](https://togithub.com/cory-miller) in
[actions/checkout#1514

##### New Contributors

- [@&#8203;joshmgross](https://togithub.com/joshmgross) made their first
contribution in
[actions/checkout#1510
- [@&#8203;peterbe](https://togithub.com/peterbe) made their first
contribution in
[actions/checkout#1511

**Full Changelog**:
actions/checkout@v4.1.0...v4.1.1

###
[`v4.1.0`](https://togithub.com/actions/checkout/blob/HEAD/CHANGELOG.md#v410)

[Compare
Source](https://togithub.com/actions/checkout/compare/v4.0.0...v4.1.0)

- [Add support for partial checkout
filters](https://togithub.com/actions/checkout/pull/1396)

</details>

<details>
<summary>docker/build-push-action (docker/build-push-action)</summary>

###
[`v5.1.0`](https://togithub.com/docker/build-push-action/releases/tag/v5.1.0)

[Compare
Source](https://togithub.com/docker/build-push-action/compare/v5.0.0...v5.1.0)

- Add `annotations` input by
[@&#8203;crazy-max](https://togithub.com/crazy-max) in
[docker/build-push-action#992
- Add `secret-envs` input by
[@&#8203;elias-lundgren](https://togithub.com/elias-lundgren) in
[docker/build-push-action#980
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.17.3 to 7.23.2 in
[docker/build-push-action#991
- Bump
[@&#8203;docker/actions-toolkit](https://togithub.com/docker/actions-toolkit)
from 0.13.0-rc.1 to 0.14.0 in
[docker/build-push-action#990
[docker/build-push-action#1006

**Full Changelog**:
docker/build-push-action@v5.0.0...v5.1.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/naa0yama/OpenWrt-FortiGate-50E-custom-image).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMDAuMCIsInVwZGF0ZWRJblZlciI6IjM3LjIwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants