Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danparisd authored and Dan committed Jan 30, 2024
1 parent 62cc400 commit fe0965f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Docker

on: [push, pull_request]

jobs:
#test building image for PR without push
test:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: FranzDiebold/[email protected]

- name: Build web image
shell: bash
run: docker build .

#build and push image
push:

runs-on: ubuntu-20.04
if: github.event_name == 'push'
needs: [test]

steps:
- uses: actions/checkout@v2
- uses: FranzDiebold/[email protected]

- name: Build web image
shell: bash
run: docker build -t wycliffeassociates/install4j-docker:$GITHUB_SHA -t wycliffeassociates/install4j-docker:$GITHUB_REF_NAME -t wycliffeassociates/install4j-docker:latest .

- name: Log into registry
shell: bash
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }}
run: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin

- name: Push image
run: |
docker push -a wycliffeassociates/doc

0 comments on commit fe0965f

Please sign in to comment.