Skip to content

Update apprenticeship-action.yml #27

Update apprenticeship-action.yml

Update apprenticeship-action.yml #27

name: Apprenticeship-action
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build -t liatrio_apprenticeship_exercise:liatrio-build .
- name: run image
run: docker run -dp 80:80 liatrio_apprenticeship_exercise:liatrio-build
- name: run tests
uses: liatrio/github-actions/apprentice-action@808117af9b4a1e57c4cb79dbcb2d25de5ea3c68d
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Docker Push
run: docker push ${{secrets.DOCKER_USER}}/liatrio_apprenticeship_exercise:liatrio-build