forked from DragonOS-Community/DragonOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish-dragonos-docker-image.yml
More file actions
39 lines (33 loc) · 1.04 KB
/
Copy pathpublish-dragonos-docker-image.yml
File metadata and controls
39 lines (33 loc) · 1.04 KB
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
32
33
34
35
36
37
38
39
name: Publish Docker images
on:
workflow_dispatch:
push:
paths:
- tools/BUILD_CONTAINER_VERSION
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Fetch versions in the repo
id: fetch-versions
run: |
BUILD_CONTAINER_VERSION=$(cat tools/BUILD_CONTAINER_VERSION)
echo "build_container_version=$BUILD_CONTAINER_VERSION" >> "$GITHUB_OUTPUT"
- name: Build and push docker image
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:tools"
file: Dockerfile
platforms: linux/amd64
push: true
tags: dragonos/dragonos-dev:${{ steps.fetch-versions.outputs.build_container_version }}