workflow: refactor steps

This commit is contained in:
Tigor Hutasuhut 2024-05-12 10:35:37 +07:00
parent e1147efbd9
commit 409d63d15e
2 changed files with 17 additions and 18 deletions

View file

@ -1,18 +0,0 @@
on:
push:
tags:
- "v*.*.*"
jobs:
deploy:
runs-on: docker
container:
image: docker:26.1.2
steps:
- run: echo "Deploying version ${{ github.ref_name }}"
- run: docker build -t git.tigor.web.id/tigor/redmage:${{ github.ref_name }} .
- run: docker build -t git.tigor.web.id/tigor/redmage:latest .
- run: docker push git.tigor.web.id/tigor/redmage:${{ github.ref_name }}
- run: docker push git.tigor.web.id/tigor/redmage:latest
- run: docker compose up -d

View file

@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow
on:
push:
tags:
- "v*.*.*"
jobs:
push:
runs-on: docker
container:
image: docker:26.1.2
steps:
- run: echo "Building version ${{ github.ref_name }}"
- run: docker build -t git.tigor.web.id/tigor/redmage:${{ github.ref_name }} -t git.tigor.web.id/tigor/redmage:latest .
- run: docker image push --all-tags git.tigor.web.id/tigor/redmage