You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*##### Sample run on the Dockerfile of Metabase Github repository
29
+

30
+
31
+
## Usage:
32
+
*#### Github Actions
33
+
To pin your Github Actions workflows, run the following command in your repository root. This will transform all the workflows in your repository to use pinned versions of the actions.
34
+
```bash
35
+
pinny actions pin
36
+
```
37
+
or if you are being rate limited by Github's API
38
+
```bash
39
+
GITHUB_TOKEN=<your_token> pinny actions pin
40
+
```
41
+
You can use the `--dry-run` flag to see what changes will be made before actually making them.
42
+
43
+
To learn more
44
+
```bash
45
+
pinny actions --help
46
+
```
47
+
48
+
* #### Dockerfiles
49
+
Pinny supports two workflows for pinning of dockerfiles.
50
+
1. ##### Pinning your files locally before you commit them
51
+
To pin your Dockerfile, run the following command in your repository root. This will look for file named `Dockerfile` in your repository root and will create a new file named `Dockerfile.pinned` with pinned versions of all the base images.
52
+
```bash
53
+
pinny docker pin
54
+
```
55
+
Use `--inplace` or `-i` flag to overwrite the original Dockerfile instead of creating a new file.
56
+
```bash
57
+
pinny docker pin --inplace
58
+
```
59
+
Use `--file` or `-f` flag to specify a different file name.
60
+
```bash
61
+
pinny docker pin --file Dockerfile.dev
62
+
```
63
+
64
+
1. ##### Generate and commit a lock file and pin your dockerfiles in CI
65
+
* ###### Generate a lock file
66
+
To generate a lock file, run the following command in your repository root. This will look for file named `Dockerfile` in your repository root and will create a file named `pinny-lock.json` with pinned versions of all the base images.
67
+
```bash
68
+
pinny docker lock
69
+
```
70
+
Use `--file` or `-f` flag to specify a different file name.
71
+
```bash
72
+
pinny docker lock --file Dockerfile.dev
73
+
```
74
+
75
+
To learn more
76
+
```bash
77
+
pinny docker lock --help
78
+
```
79
+
* ###### Tranform your dockerfiles in CI
80
+
Once you have committed the lock file, you can use the following command in your CI to transform your dockerfiles to use pinned versions of the base images.
81
+
```bash
82
+
pinny docker transform
83
+
```
84
+
Use `--file` or `-f` flag to specify a different file name.
85
+
```bash
86
+
pinny docker transform --file Dockerfile.dev
87
+
```
88
+
Use `--inplace` or `-i` flag to overwrite the original Dockerfile instead of creating a new file.
89
+
```bash
90
+
pinny docker transform --inplace
91
+
```
92
+
`This command requires you have a file named pinny-lock.json.`<br/>
93
+
To learn more
94
+
```bash
95
+
pinny docker tranform --help
96
+
```
97
+
98
+
## Installation:
9
99
* #### Docker image
10
100
Get the version from the releases section and run the following command(Replace 0.0.6 with the version you want to use)
11
101
```bash
@@ -30,81 +120,4 @@ Pinny currently supports pinning Dockerfiles and Github Actions workflows.
30
120
On MacOS, if you get an error like `Cannot Verify That This App is Free from Malware` Or `This app is from an unidentified developer`, you can run the following command to allow the binary to run
To pin your Github Actions workflows, run the following commandin your repository root. This will transform all the workflows in your repository to use pinned versions of the actions.
38
-
```bash
39
-
pinny actions pin
40
-
```
41
-
or if you are being rate limited by Github's API
42
-
```bash
43
-
GITHUB_TOKEN=<your_token> pinny actions pin
44
-
```
45
-
You can use the `--dry-run` flag to see what changes will be made before actually making them.
46
-
47
-
To learn more
48
-
```bash
49
-
pinny actions --help
50
-
```
51
-
52
-
### Dockerfiles
53
-
Pinny supports two workflows forpinning of dockerfiles.
54
-
55
-
#### 1. Pinning your files locally before you commit them
56
-
To pin your Dockerfile, run the following command in your repository root. This will look for file named `Dockerfile` in your repository root and will create a new file named `Dockerfile.pinned` with pinned versions of all the base images.
57
-
```bash
58
-
pinny docker pin
59
-
```
60
-
Use `--inplace` or `-i` flag to overwrite the original Dockerfile instead of creating a new file.
61
-
```bash
62
-
pinny docker pin --inplace
63
-
```
64
-
Use `--file` or `-f` flag to specify a different file name.
65
-
```bash
66
-
pinny docker pin --file Dockerfile.dev
67
-
```
68
-
69
-
#### 2. Generate and commit a lock file and pin your dockerfiles in CI
70
-
##### Generate a lock file
71
-
To generate a lock file, run the following command in your repository root. This will look for file named `Dockerfile` in your repository root and will create a file named `pinny-lock.json` with pinned versions of all the base images.
72
-
```bash
73
-
pinny docker lock
74
-
```
75
-
Use `--file` or `-f` flag to specify a different file name.
76
-
```bash
77
-
pinny docker lock --file Dockerfile.dev
78
-
```
79
-
To learn more
80
-
```bash
81
-
pinny docker lock --help
82
-
```
83
-
##### Tranform your dockerfiles in CI
84
-
Once you have committed the lock file, you can use the following command in your CI to transform your dockerfiles to use pinned versions of the base images.
85
-
```bash
86
-
pinny docker transform
87
-
```
88
-
Use `--file` or `-f` flag to specify a different file name.
89
-
```bash
90
-
pinny docker transform --file Dockerfile.dev
91
-
```
92
-
Use `--inplace` or `-i` flag to overwrite the original Dockerfile instead of creating a new file.
93
-
```bash
94
-
pinny docker transform --inplace
95
-
```
96
-
This command requires you have a file named pinny-lock.json.
0 commit comments