From eaf1b23513571edfdc973f6893cc6e91898e63f5 Mon Sep 17 00:00:00 2001 From: crocandr Date: Tue, 24 Jan 2023 13:58:44 +0100 Subject: [PATCH] github workflow file added --- .github/workflows/build.yml | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..8e133ea --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,41 @@ +# This is a basic workflow to help you get started with Actions + +name: Auto-CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "master" branch + push: + branches: [ "master" ] +# pull_request: +# branches: [ "master" ] + schedule: + # # UTC time 3:00 = 5:00 CET + - cron: '30 3 * * 6' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build-amd64: + # The type of runner that the job will run on + runs-on: ubuntu-latest + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + - name: build image - AMD64 + run: | + docker build --rm -t croc/minidlna . || { echo "docker image build failed - amd64"; exit 1; } + docker images croc/minidlna + - name: push container + env: + DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }} + DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }} + run: | + echo "$DOCKERHUB_PASS" | docker login --username=$DOCKERHUB_USER --password-stdin + docker images | grep -iw minidlna + # push latest images + docker push croc/minidlna \ No newline at end of file