-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.02 KB
/
github-docker-dev.yml
File metadata and controls
39 lines (37 loc) · 1.02 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: Dev Docker Image CI(GitHub)
on:
push:
branches-ignore:
- main
tags-ignore:
- '**'
jobs:
build:
name: Build & Push
runs-on: ubuntu-latest
if: github.event.pusher.name == 'OldTyT'
env:
REPOSITORY_URL: ghcr.io
IMAGE_NAME: oldtyt/vibepython
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Variables
id: vars
run: echo "::set-output name=SHORT_COMMIT_ID::$(git rev-parse --short HEAD)"
- name: Build image
id: docker-build
run: >-
docker build
-t $REPOSITORY_URL/$IMAGE_NAME:dev-${{ steps.vars.outputs.SHORT_COMMIT_ID }}
-t $REPOSITORY_URL/$IMAGE_NAME:dev .
- name: Docker Login
uses: docker/login-action@v3
with:
registry: ${{ env.REPOSITORY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Image
id: docker-push
run: docker push --all-tags $REPOSITORY_URL/$IMAGE_NAME