Skip to content

Commit

Permalink
auto create release
Browse files Browse the repository at this point in the history
  • Loading branch information
phoehnel committed Jan 9, 2022
1 parent 6f31cba commit e45d711
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/publish_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ env:
# On Release
##################################################
on:
release:
types: [published]
push:
branches:
- main

jobs:
build:
Expand All @@ -19,6 +20,21 @@ jobs:
- name: Checkout project
uses: actions/checkout@v2

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d-%H%M')"

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.date }}
release_name: ${{ steps.date.outputs.date }}
body: Automatically created release for pushs in main
prerelease: true

- name: Update Docker Hub Description
uses: peter-evans/dockerhub-description@v2
with:
Expand All @@ -37,10 +53,6 @@ jobs:
- name: Login to DockerHub
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y.%m.%d')"

- name: Build the tagged Docker image
run: >
docker buildx build
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ RUN export BUILD_TOOLS="git make gcc g++" && export WIRINGPI_SUDO="" \
&& rm -rf .git && cd "RPi_utils" && make all \
&& apt purge -y $BUILD_TOOLS && apt-get autoremove -y\
&& rm -rf /tmp/* /var/lib/apt/lists/* \
&& chown -R root:www-data /opt/433Utils/RPi_utils/ \
&& chmod -R 0755 /opt/433Utils/RPi_utils \
&& chmod +s /opt/433Utils/RPi_utils/send && chmod +s /opt/433Utils/RPi_utils/codesend \
&& cd "$APP_PATH"

# Copy App
Expand Down

0 comments on commit e45d711

Please sign in to comment.