Skip to content

Commit

Permalink
ci: docker release (#3)
Browse files Browse the repository at this point in the history
* ci: test docker release action

* ci: change trigger

* chore: lock bundler version

* fix: fix docker push command

* ci: change trigger

* ci: run release only on tag
  • Loading branch information
rahmatrhd authored Jul 31, 2024
1 parent 00828a4 commit 6c293b8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Docker Image CI

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag gotocompany/gate:${{ github.ref_name }}
- name: Login to DockerHub
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image
run: docker push gotocompany/gate:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /app
COPY Gemfile /app
COPY Gemfile.lock /app

RUN gem install bundler -v '>= 2.0'
RUN gem install bundler -v '2.0.2'
RUN bundle install --without development
COPY . /app

Expand Down

0 comments on commit 6c293b8

Please sign in to comment.