Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zhilyaev authored Feb 6, 2022
1 parent af7b43a commit 68600e1
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: build dochub nginx
on:
push:
tags:
- v*

jobs:
buildx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get git tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- run: |
wget -L https://raw.githubusercontent.com/RabotaRu/DocHub/archops-conception-v2/example.env
cat example.env | grep ^VUE_APP | awk -F'=' '{print $1 "=" $1}' > .env
- id: buildx
uses: docker/setup-buildx-action@v1
with:
config-inline: |
[registry."docker.io"]
mirrors = ["mirror.gcr.io"]
- name: Login to ghrc.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
target: nginx
tags: "ghcr.io/rabotaru/dochub/nginx:${{ steps.vars.outputs.tag }}"

0 comments on commit 68600e1

Please sign in to comment.