Skip to content

Commit 0a2a44c

Browse files
committed
move build templates into builds directory
1 parent 63e504d commit 0a2a44c

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches: ["your-branch"]
6+
7+
env:
8+
REGISTRY_IMAGE: ghcr.io/lurian/sample
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up QEMU
17+
uses: docker/setup-qemu-action@v3
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Login to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and push
30+
id: build
31+
uses: docker/build-push-action@v5
32+
with:
33+
platforms: linux/amd64,linux/arm64
34+
secrets: |
35+
"git_auth=${{ secrets.GIT_AUTH_CREDENTIALS }}"
36+
push: true
37+
tags: |
38+
${{ env.REGISTRY_IMAGE }}:${{ env.IMAGE_TAG }}
39+
${{ env.REGISTRY_IMAGE }}:${{ github.sha }}
40+
41+
- name: Inspect image
42+
run: |
43+
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ env.IMAGE_TAG }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: rust-build
22

33
env:
4-
REGISTRY_IMAGE: lurian/sample
4+
REGISTRY_IMAGE: ghrc.io/lurian/sample
55
IMAGE_TAG: latest
66

77
on:

0 commit comments

Comments
 (0)