Skip to content

Commit 252dff2

Browse files
committed
Improve some code
1 parent e879727 commit 252dff2

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

{{cookiecutter.stack_name}}/.github/workflows/docker.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build, test, and publish Docker Images
1+
name: Build, test, and publish Docker Image
22

33
env:
44
{%- raw %}
@@ -7,7 +7,7 @@ env:
77
{%- endraw %}
88

99
# For more details on events that trigger workflows see:
10-
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows
10+
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
1111
on:
1212
schedule:
1313
# Weekly, at 07:00 on Monday UTC time
@@ -37,7 +37,7 @@ concurrency:
3737
cancel-in-progress: true
3838

3939
jobs:
40-
build-test-publish-images:
40+
build-test-publish-image:
4141
runs-on: ubuntu-24.04
4242
permissions:
4343
contents: write
@@ -80,8 +80,8 @@ jobs:
8080
run: python3 -m pytest tests
8181

8282
- name: Login to Docker Hub 🔐
83-
if: github.ref == 'refs/heads/main'
84-
uses: docker/login-action@v3
83+
if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
84+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
8585
with:
8686
{%- raw %}
8787
username: ${{ env.OWNER }}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM {{cookiecutter.stack_base_image}}
22

3-
# Add RUN statements to install packages as the $NB_USER defined in the base images.
3+
# Add RUN statements to install packages as the ${NB_USER} defined in the base images.
44

5-
# Add a "USER root" statement followed by RUN statements to install system packages using apt-get,
6-
# change file permissions, etc.
5+
# Add a "USER root" statement followed by RUN statements
6+
# to install system packages using apt-get, change file permissions, etc.
77

8-
# If you do switch to root, always be sure to add a "USER $NB_USER" command at the end of the
9-
# file to ensure the image runs as a unprivileged user by default.
8+
# If you do switch to root, always be sure to add a "USER ${NB_UID}" command
9+
# at the end of the file to ensure the image runs as a unprivileged user by default.

0 commit comments

Comments
 (0)