Skip to content

Commit

Permalink
fix slashes in dev deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr committed May 18, 2024
1 parent 37bea59 commit f3dd17f
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/deploy-image-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,37 @@ name: Deploy Development Docker Images to GHCR

on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!main' # excludes main
branches:
- "*" # matches every branch that doesn't contain a '/'
- "*/*" # matches every branch containing a single '/'
- "**" # matches every branch
- "!main" # excludes main
workflow_dispatch:

jobs:
push-image:
runs-on: ubuntu-latest
steps:
- name: 'Make repo lowercase'
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
push-image:
runs-on: ubuntu-latest
steps:
- name: "Make repo lowercase"
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's/\//-/g' >> $GITHUB_OUTPUT
id: extract_branch

- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
- name: "Checkout GitHub Action"
uses: actions/checkout@v4

- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GH_TOKEN}}
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GH_TOKEN}}

- name: 'Build & Publish Docker Image'
run: |
docker build . --tag "ghcr.io/${REPO}:dev-${{ steps.extract_branch.outputs.branch }}"
docker push "ghcr.io/${REPO}:dev-${{ steps.extract_branch.outputs.branch }}"
- name: "Build & Publish Docker Image"
run: |
docker build . --tag "ghcr.io/${REPO}:dev-${{ steps.extract_branch.outputs.branch }}"
docker push "ghcr.io/${REPO}:dev-${{ steps.extract_branch.outputs.branch }}"
38 changes: 19 additions & 19 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ on:
workflow_dispatch:

jobs:
push-image:
runs-on: ubuntu-latest
steps:
- name: 'Make repo lowercase'
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4
push-image:
runs-on: ubuntu-latest
steps:
- name: "Make repo lowercase"
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GH_TOKEN}}
- name: "Checkout GitHub Action"
uses: actions/checkout@v4

- name: 'Build & Publish Docker Image'
run: |
docker build . --tag "ghcr.io/${REPO}:latest"
docker push "ghcr.io/${REPO}:latest"
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GH_TOKEN}}

- name: "Build & Publish Docker Image"
run: |
docker build . --tag "ghcr.io/${REPO}:latest"
docker push "ghcr.io/${REPO}:latest"

0 comments on commit f3dd17f

Please sign in to comment.