forked from nrfconnect/sdk-nrf
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (25 loc) · 871 Bytes
/
docker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Build and Push Docker Image
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: NordicBuilder
password: ${{ secrets.NCS_GITHUB_PKG_WRITE_TOKEN }}
- name: Build and push Docker image
run: |
TOOLCHAIN_ID=$(../print_toolchain_checksum.sh)
docker build -t ghcr.io/${{ github.repository }}-toolchain:${{ github.ref_name }} --build-arg VERSION=$TOOLCHAIN_ID .
docker push ghcr.io/${{ github.repository }}-toolchain:${{ github.ref_name }}
working-directory: scripts/docker