Skip to content

Commit

Permalink
release build
Browse files Browse the repository at this point in the history
  • Loading branch information
jbsulli authored Jun 24, 2024
2 parents f73120a + 505d59b commit 694a682
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish-version.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
release:
types: [created]

jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Docker image
run: docker build --rm -t phantomized .

- name: Run Docker image
run: docker run --name phantomized -e PHANTOM_VERSION=2.1.1 phantomized

- name: Copy file from Docker container
run: docker cp phantomized:/app/dockerized-phantomjs.tar.gz ./dockerized-phantomjs.tar.gz

- name: Remove Docker container
run: docker rm phantomized

# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: phantomized.tar.gz
# path: ./dockerized-phantomjs.tar.gz

- name: Upload artifact to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./dockerized-phantomjs.tar.gz
asset_name: dockerized-phantomjs.tar.gz
asset_content_type: application/gzip
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM ubuntu:14.04
MAINTAINER Gravebot
FROM ubuntu:18.04

# Setup system deps
RUN apt-get update
RUN apt-get -y install build-essential curl rsync tar python python-pip git libfontconfig1

# Setup Node
ENV NODE_VERSION 4.4.2
ENV NODE_VERSION 6.17.1
ENV NPM_VERSION 3.8.5

RUN git clone https://github.com/creationix/nvm.git /.nvm
Expand Down

0 comments on commit 694a682

Please # to comment.