Skip to content

Commit

Permalink
login action v3 wo push
Browse files Browse the repository at this point in the history
  • Loading branch information
anikobartos committed Sep 18, 2023
1 parent b252cc4 commit 58e2992
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ env:

jobs:
dockerbuild:
if: github.ref == 'refs/heads/test'
runs-on: ubuntu-latest
steps:
- name: Print branch name
run: echo "Actual branch is ${{ github.ref }}."
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
shell: bash
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
print_name:
if: github.ref != 'refs/heads/test'
runs-on: ubuntu-latest
steps:
- name: Print branch name
run: echo "Actual branch is ${{ github.ref }}.."
steps:
- name: Check out repository code
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: false
tags: ${{ env.REGISTRY }}/${{ env.REPO_NAME }}:${{ github.ref_name }}
build-args: version=${{ github.ref_name }}
13 changes: 13 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
gitpython = "*"
assemblyline-service-utilities = "*"

[dev-packages]

[requires]
python_version = "3.10"

0 comments on commit 58e2992

Please sign in to comment.