Skip to content

Commit

Permalink
Added GitHub workflow to deploy Docker Images into GitHub Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomelo9 committed Feb 4, 2024
1 parent 304e077 commit 669e8d5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy Docker Images

on: [push]

jobs:
synthesis:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: docker build -f recipes/synthesis -t ghcr.io/pyfpga/synthesis .
- name: Push Docker image
run: docker push ghcr.io/pyfpga/synthesis
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
set -e
IMAGE=$1
docker build -f recipes/$IMAGE -t pyfpga/$IMAGE .
docker build -f recipes/$IMAGE -t ghcr.io/pyfpga/$IMAGE .
5 changes: 3 additions & 2 deletions recipes/synthesis
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ RUN apt update -qq \
jq \
tar \
wget \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*.deb \
&& apt clean \
&& update-ca-certificates

###############################################################################
Expand Down Expand Up @@ -80,6 +82,5 @@ RUN mkdir synlig && cd synlig \
# Clean
###############################################################################

RUN apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/apt/archives/*.deb \
RUN rm -rf /tmp/* /var/tmp/* \
&& rm -fr /root/ghdl /root/yosys /root/ghdl-yosys-plugin /root/synlig

0 comments on commit 669e8d5

Please sign in to comment.