Add build action
Build dev-container / Build image (push) Successful in 1m11s
Details
Build dev-container / Build image (push) Successful in 1m11s
Details
This commit is contained in:
parent
cffb5fe5f7
commit
096d099bcd
|
@ -0,0 +1,30 @@
|
|||
name: Build dev-container
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build image
|
||||
runs-on: ubuntu-latest
|
||||
container: git.namesny.com/cluster/act-runner:v1
|
||||
env:
|
||||
IMAGE_NAME: dev-container
|
||||
REGISTRY: git.namesny.com
|
||||
REPO_OWNER: mathis
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to Gitea registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.namesny.com
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
- name: Build and push
|
||||
run: |
|
||||
TODAY=$(date +'%Y-%m-%d')
|
||||
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
||||
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY}
|
||||
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
Loading…
Reference in New Issue