Skip to content

Commit 8f7f287

Browse files
committed
build and push
1 parent 37c45e4 commit 8f7f287

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Container Build
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
container-build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
packages: write
12+
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v3
18+
19+
- name: Log in to GitHub Container Registry
20+
if: github.ref == 'refs/heads/main'
21+
uses: docker/login-action@v3
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Build and push
28+
uses: docker/build-push-action@v6
29+
with:
30+
context: .
31+
push: ${{ github.ref == 'refs/heads/main' }}
32+
tags: ghcr.io/bytes-zone/mazes:${{ github.sha }}
33+
cache-from: type=gha
34+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)