Skip to content

Commit f37786a

Browse files
committed
chore: Update docker workflow
1 parent e3a4eac commit f37786a

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# to do this for some reason:
33
# $ go get -v -u github.com/pwaller/docker-show-context
44
main
5+
*.gro
6+
**/*.gro
57
*.mashtree
68
**/*.mashtree
79
*.swp

.github/workflows/docker-publish.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout project
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2424

2525
- name: Parse tag
2626
# This step converts Grain tags into standard semver, i.e. grain-v1.2.3 -> v1.2.3
@@ -48,7 +48,7 @@ jobs:
4848
ssh-private-key: ${{ secrets.AWS_SSH_PRIVATE_KEY }}
4949

5050
- name: Set up Docker Buildx
51-
uses: docker/setup-buildx-action@v2.0.0
51+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
5252

5353
- name: Set up remote builder
5454
run: |
@@ -61,7 +61,7 @@ jobs:
6161
6262
- name: Docker meta
6363
id: meta
64-
uses: docker/metadata-action@v3.6.0
64+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
6565
with:
6666
images: |
6767
grainlang/grain
@@ -72,20 +72,20 @@ jobs:
7272
type=semver,pattern={{major}}.{{minor}},value=${{ steps.vars.outputs.tag }}
7373
7474
- name: Login to DockerHub
75-
uses: docker/login-action@v2.0.0
75+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
7676
with:
7777
username: ${{ secrets.DOCKER_USERNAME }}
7878
password: ${{ secrets.DOCKER_PASSWORD }}
7979

8080
- name: Login to Github Container Registry
81-
uses: docker/login-action@v2.0.0
81+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
8282
with:
8383
registry: ghcr.io
8484
username: ${{ github.actor }}
8585
password: ${{ secrets.GITHUB_TOKEN }}
8686

8787
- name: Build and push image
88-
uses: docker/build-push-action@v2.7.0
88+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
8989
with:
9090
context: .
9191
file: Dockerfile
@@ -100,7 +100,7 @@ jobs:
100100
runs-on: ubuntu-latest
101101
steps:
102102
- name: Checkout project
103-
uses: actions/checkout@v3
103+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
104104

105105
- name: Parse tag
106106
# This step converts Grain tags into standard semver, i.e. grain-v1.2.3 -> v1.2.3
@@ -128,7 +128,7 @@ jobs:
128128
ssh-private-key: ${{ secrets.AWS_SSH_PRIVATE_KEY }}
129129

130130
- name: Set up Docker Buildx
131-
uses: docker/setup-buildx-action@v2.0.0
131+
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
132132

133133
- name: Set up remote builder
134134
run: |
@@ -141,7 +141,7 @@ jobs:
141141
142142
- name: Docker meta
143143
id: meta
144-
uses: docker/metadata-action@v3.6.0
144+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
145145
with:
146146
flavor: |
147147
suffix=-slim,onlatest=true
@@ -154,20 +154,20 @@ jobs:
154154
type=semver,pattern={{major}}.{{minor}},value=${{ steps.vars.outputs.tag }}
155155
156156
- name: Login to DockerHub
157-
uses: docker/login-action@v2.0.0
157+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
158158
with:
159159
username: ${{ secrets.DOCKER_USERNAME }}
160160
password: ${{ secrets.DOCKER_PASSWORD }}
161161

162162
- name: Login to Github Container Registry
163-
uses: docker/login-action@v2.0.0
163+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
164164
with:
165165
registry: ghcr.io
166166
username: ${{ github.actor }}
167167
password: ${{ secrets.GITHUB_TOKEN }}
168168

169169
- name: Build and push slim image
170-
uses: docker/build-push-action@v2.7.0
170+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
171171
with:
172172
context: .
173173
file: Dockerfile-slim

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Dockerfile constructs an environment in which the Grain compiler can be built and used.
22

3-
FROM ospencer/esy:alpine as esy
3+
FROM ospencer/esy:alpine AS esy
44
FROM node:18
55

66
LABEL name="Grain"

Dockerfile-slim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This Dockerfile constructs a minimal environment in which Grain programs can be compiled.
22
# The environment is only meant to build Grain programs, not develop the compiler.
33

4-
FROM ospencer/esy:alpine as esy
5-
FROM node:18 as builder
4+
FROM ospencer/esy:alpine AS esy
5+
FROM node:18 AS builder
66

77
LABEL name="Grain"
88
LABEL description="Grain CLI"

0 commit comments

Comments
 (0)