Update .gitea/workflows/build.yaml
Some checks failed
Build docker container / Build image (push) Failing after 1m35s
Some checks failed
Build docker container / Build image (push) Failing after 1m35s
This commit is contained in:
parent
739be4169e
commit
fcd8469dce
@ -1,23 +1,31 @@
|
|||||||
|
name: Build docker container
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Build image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container: ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: example-image
|
||||||
|
REGISTRY: git.ties.one
|
||||||
|
REPO_OWNER: public
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: https://git.ties.one
|
registry: https://git.ties.one
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
TODAY=$(date +'%Y-%m-%d')
|
||||||
context: .
|
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
|
||||||
push: true
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${TODAY}
|
||||||
tags: https://git.ties.one/public/custom_act_runner:latest
|
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user