Skip to content

Commit

Permalink
tag image via action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Feb 29, 2024
1 parent c58e62f commit 9afc6fb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- name: Build (latest)
if: ${{ github.ref == 'refs/heads/main' }}
run: |
export TAG=amd64
export VCS_REF=$(git rev-parse HEAD)
npm install -g @devcontainers/cli
devcontainer build --workspace-folder . --config devcontainer.json --image-name cs50/codespace:${{ github.sha }} --image-name cs50/codespace:latest
Expand All @@ -59,6 +60,7 @@ jobs:
- name: Build ${{ github.ref_name}}
if: ${{ github.ref != 'refs/heads/main' }}
run: |
export TAG=amd64
export VCS_REF=$(git rev-parse HEAD)
npm install -g @devcontainers/cli
devcontainer build --workspace-folder . --config devcontainer.json --image-name cs50/codespace:${{ github.sha }} --image-name cs50/codespace:${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
ARG TAG=amd64
ARG TAG
FROM cs50/cli:${TAG} as builder
ARG DEBIAN_FRONTEND=noninteractive

Expand Down
1 change: 1 addition & 0 deletions devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"build": {
"args": {
"TAG": "${localEnv:TAG}",
"VCS_REF": "${localEnv:VCS_REF}"
},
"context": ".",
Expand Down

0 comments on commit 9afc6fb

Please sign in to comment.