Skip to content

Commit 83acd75

Browse files
committed
Add gh package
1 parent 3d6a28f commit 83acd75

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/container.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: container
2+
on:
3+
push:
4+
branches: [main]
5+
workflow_dispatch:
6+
permissions:
7+
contents: read
8+
packages: write
9+
pages: write
10+
id-token: write
11+
concurrency:
12+
group: pages
13+
cancel-in-progress: false
14+
env:
15+
CONTAINER_REGISTRY: ghcr.io
16+
CONTAINER_IMAGE: ghcr.io/${{ github.actor}}/${{ github.event.repository.name }}
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Log in to Docker Registry
26+
uses: docker/login-action@v3
27+
with:
28+
registry: ${{ env.CONTAINER_REGISTRY }}
29+
username: ${{ github.actor }}
30+
password: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
- name: Set up QEMU
34+
uses: docker/setup-qemu-action@v3
35+
- name: Build and push docker image
36+
uses: docker/build-push-action@v6
37+
with:
38+
push: true
39+
tags: |
40+
${{ env.CONTAINER_IMAGE }}:latest
41+
${{ env.CONTAINER_IMAGE }}${{ github.sha }}
42+
cache-from: type=registry,ref=${{ github.actor}}/${{ github.event.repository.name }}:latest
43+
cache-to: type=inline

0 commit comments

Comments
 (0)