Skip to content

Commit

Permalink
Добавлена автосборка docker-образа
Browse files Browse the repository at this point in the history
  • Loading branch information
novikovSU authored Oct 31, 2024
1 parent 69be7f9 commit 245f94f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: build
on: [push, pull_request]
jobs:

build:
name: build
runs-on: ubuntu-latest
steps:

- name: checkout
uses: actions/checkout@v4

- name: build and push master image
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
docker build -t radiot/tg-retrans:master .
docker login --username ${{ secrets.DOCKERHUB_USER }} --password ${{ secrets.DOCKERHUB_PASSWD }}
docker push radiot/tg-retrans:master
- name: build and push tagged image
if: github.event_name == 'push' && github.event.ref_type == 'tag'
run: |
GIT_TAG="${GITHUB_REF#refs/tags/}"
docker build -t radiot/tg-retrans:${GIT_TAG} .
docker login --username ${{ secrets.DOCKERHUB_USER }} --password ${{ secrets.DOCKERHUB_PASSWD }}
docker push radiot/tg-retrans:${GIT_TAG}
docker tag radiot/tg-retrans:${GIT_TAG} radiot/tg-retrans:latest
docker push radiot/tg-retrans:latest

0 comments on commit 245f94f

Please sign in to comment.