Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Carlos Ribas
rnacentral-webcode
Commits
293bcaaf
Commit
293bcaaf
authored
Mar 23, 2021
by
carlosribas
Browse files
Add action to build Docker containers
parent
edf56171
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
.github/workflows/main.yml
.github/workflows/main.yml
+33
-0
No files found.
.github/workflows/main.yml
0 → 100644
View file @
293bcaaf
name
:
Building Docker containers
on
:
# Triggers the workflow on push, except for the master branch
push
:
branches
:
-
'
**'
-
'
!master'
jobs
:
build
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
-
name
:
docker login
env
:
DOCKER_USER
:
${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD
:
${{ secrets.DOCKER_PASSWORD }}
run
:
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
-
name
:
Get branch name
if
:
github.event_name != 'pull_request'
shell
:
bash
run
:
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
-
name
:
docker build
if
:
env.BRANCH_NAME != ''
run
:
docker build -f Dockerfile-development -t rnacentral/rnacentral-webcode:${{ env.BRANCH_NAME }} .
-
name
:
docker push
if
:
env.BRANCH_NAME != ''
run
:
docker push rnacentral/rnacentral-webcode:${{ env.BRANCH_NAME }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment