Merge pull request #32 from ProgSoc/pr32 #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: edgedb install | |
run: bash <(curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com) -y | |
- name: init edgedb | |
run: cd src/server && edgedb project init --non-interactive | |
- name: generate edgedb schema types | |
run: bun server gen-edgedb | |
- name: docker login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Build the Docker image | |
run: docker build . --no-cache -t ${{secrets.DOCKER_USER}}/club-voting-system:$(date +%s) -t ${{secrets.DOCKER_USER}}/club-voting-system:latest | |
- name: Docker Push | |
run: docker push ${{secrets.DOCKER_USER}}/club-voting-system |