added deployment file
This commit is contained in:
1 parent
061d5fd8a4
commit
125eab3cd4
14 files changed
+704
-1
No files matched your search
@@ -0,0 +1,40 @@
|
||||
# Explicit URLs and commit pins keep action sources predictable on Gitea.
|
||||
# yamllint disable rule:line-length
|
||||
name: Build and publish Docker image
|
||||
|
||||
'on':
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
IMAGE: gitea.cptckp.com/nurinda/recruitment-hc
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Log in to Gitea Container Registry
|
||||
uses: https://github.com/docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
|
||||
with:
|
||||
registry: gitea.cptckp.com
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and publish latest
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
docker build --tag "$IMAGE:latest" .
|
||||
docker push "$IMAGE:latest"
|
||||
Reference in new issue
Block a user