Skip to content

Commit

Permalink
gh actions: fixes formatting, updates cache and renames file
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Oct 24, 2022
1 parent 7b0c61a commit 5f7c6eb
Showing 1 changed file with 9 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:

env:
# secrets can be set in settings/secrets on github
DOCKER_REGISTRY: { { "${{ secrets.DOCKER_REGISTRY }}" } }
DOCKER_USERNAME: { { "${{ secrets.DOCKER_USERNAME }}" } }
DOCKER_PASSWORD: { { "${{ secrets.DOCKER_PASSWORD }}" } }
DOCKER_REGISTRY: {{ "${{ secrets.DOCKER_REGISTRY }}" }}
DOCKER_USERNAME: {{ "${{ secrets.DOCKER_USERNAME }}" }}
DOCKER_PASSWORD: {{ "${{ secrets.DOCKER_PASSWORD }}" }}

jobs:
build:
name: building {{ cookiecutter.project_slug }}
runs-on: { { "${{ matrix.os }}" } }
runs-on: {{ "${{ matrix.os }}" }}
strategy:
matrix:
python: [3.9]
Expand All @@ -24,21 +24,11 @@ jobs:
- name: setup python environment
uses: actions/setup-python@v4
with:
python-version: { { "${{ matrix.python }}" } }
python-version: {{ "${{ matrix.python }}" }}
cache: "pip"
cache-dependency-path: "**/requirements*.txt"
- name: show versions
run: ./scripts/show_system_versions.bash
- uses: actions/cache@v3
name: getting cached data
with:
path: ~/.cache/pip
key:
{
{
"${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}",
},
}
restore-keys: |
{{ "${{ runner.os }}" }}-pip-
- name: set owner variable
run: echo "OWNER=${GITHUB_REPOSITORY%/*}" >> $GITHUB_ENV
- name: set docker image tag
Expand All @@ -55,12 +45,12 @@ jobs:
- name: test
run: make tests
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: deploy
name: push
run: |
./scripts/dockerhub_login.bash
make push
- if: github.event_name == 'push' && github.ref != 'refs/heads/master'
name: deploy
name: push
run: |
./scripts/dockerhub_login.bash
make push-version

0 comments on commit 5f7c6eb

Please sign in to comment.