From 60ea0fa0de4f351bc7ba7891e9aac97580a37311 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Sat, 31 Dec 2022 03:29:02 +0100 Subject: [PATCH] ci: use workflow inside cafe-common --- .github/workflows/main.yml | 63 ++++++-------------------------------- 1 file changed, 9 insertions(+), 54 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2042417..0239c86 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,64 +1,19 @@ -# This is a basic workflow to help you get started with Actions +name: reusing workflow -name: CI to Docker Hub - -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master branch push: branches: [ "*" ] pull_request: branches: [ "*" ] - # 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-and-deploy: - # 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: - - - name: Install dependencies - run: sudo apt-get install python3-github - - - name: Check Out Repo - uses: actions/checkout@v2 - - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: install docker-build - run: | - curl -Ls -o install-dockerbuild https://github.com/cafe-desktop/cafe-dev-scripts/raw/master/travis/build/install-dockerbuild.sh - curl -Ls -o build-push https://github.com/cafe-desktop/cafe-dev-scripts/raw/master/travis/build/build-push.sh - chmod +x install-dockerbuild build-push - ./install-dockerbuild - - - name: Build and push - env: - TRAVIS_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - run: | - ./build-push - - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 - if: ${{ github.event_name == 'push' }} - with: - branch: gh-pages - folder: html-report - single-commit: true - - - name: Image digest - run: echo ${{ steps.docker_build.outputs.digest }} + docker: + uses: cafe-desktop/cafe-common/.github/workflows/main.yml@master + with: + image_name: cafe-calc + tag: $GITHUB_RUN_NUMBER + secrets: + DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} + DOCKER_HUB_ACCESS_TOKEN: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}