Skip to content

Commit ee22615

Browse files
Create github action to build docker image
1 parent c1eaad7 commit ee22615

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and publish docker image
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
steps:
15+
- name: Checkout repository
16+
- uses: actions/checkout@v4
17+
18+
- name: Log in to GHCR
19+
- uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ secrets.USER_NAME }} # username
23+
password: ${{ secrets.CR_PAT }} # PAT for CR repository
24+
25+
- name: Build Docker Image
26+
run: docker build . --file Dockerfile --tag ghcr.io/intelligent-testing-lab/autoware-scenario-runner:$(date +%s)
27+
28+
- name: Push Docker Image
29+
run: docker push ghcr.io/intelligent-testing-lab/autoware-scenario-runner:$(date +%s)

0 commit comments

Comments
 (0)