From af7d8676525f856716afd6b83f1edfbaaaf3ec70 Mon Sep 17 00:00:00 2001 From: Jaimyn Mayer Date: Fri, 4 Aug 2023 11:49:25 +1000 Subject: [PATCH] update github actions --- .github/workflows/black.yml | 6 ++---- .github/workflows/build_docker.dev.yml | 16 ++++++---------- .github/workflows/build_docker.yml | 20 ++++++++------------ .github/workflows/eslint.yml | 2 +- 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index 6d62d063..6ea9bd02 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -6,8 +6,6 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 - uses: psf/black@stable - with: - args: ". --check" diff --git a/.github/workflows/build_docker.dev.yml b/.github/workflows/build_docker.dev.yml index f26e7eeb..e401b722 100644 --- a/.github/workflows/build_docker.dev.yml +++ b/.github/workflows/build_docker.dev.yml @@ -3,28 +3,24 @@ name: Build Docker Image on: push: branches: - - 'dev' + - "dev" jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub + - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: docker/Dockerfile platforms: linux/amd64 diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 8de33988..945efab7 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -2,31 +2,27 @@ name: Build Docker Image on: push: - branches: - - 'main' + tags: + - "v*.*.*" jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub + - name: Login to DockerHub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: docker/Dockerfile platforms: linux/amd64,linux/arm64,linux/arm/v7 push: true - tags: membermatters/membermatters:latest + tags: membermatters/membermatters:latest,membermatters/membermatters:${{github.ref_name}} diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 0cebffb2..4917e58d 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -4,7 +4,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install modules working-directory: ./src-frontend run: npm i