Skip to content

Commit

Permalink
push only on main (#23)
Browse files Browse the repository at this point in the history
* disable optional extras and add hugo

* disable optional extras and add hugo

* dont push image if not a commit to main branch
  • Loading branch information
usrbinkat authored Nov 16, 2023
1 parent e6e24d1 commit 0934400
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
- '.vscode/**'
- '**.md'
schedule:
- cron: '0 0 * * *'
- cron: '0 0 * * 0'

jobs:
build:
Expand Down Expand Up @@ -48,8 +48,19 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build & Publish Dev Container
id: docker
name: Build Dev Container Image
uses: docker/build-push-action@v5
with:
push: false
load: true
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
tags: 'ghcr.io/${{ github.repository_owner }}/devcontainer:latest'

-
name: Push Dev Container Image
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: docker/build-push-action@v5
with:
push: true
Expand Down
2 changes: 1 addition & 1 deletion devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"editor.gotoLocation.multipleDeclarations", "goto",
"editor.gotoLocation.multipleImplementations", "goto",
"editor.gotoLocation.multipleTypeDefinitions", "goto",
"terminal.integrated.shell.linux": "/usr/bin/zsh",
"editor.terminal.integrated.shell.linux", "/usr/bin/zsh",
"files.trimTrailingWhitespace", true,
"files.trimFinalNewlines", true
],
Expand Down

0 comments on commit 0934400

Please sign in to comment.