Skip to content

Commit

Permalink
chore: moving from docker hub to ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeluk committed Aug 27, 2024
1 parent 6538ead commit fe0ae2c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,26 @@ name: build-image
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
VERSION: 0.0.7
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.repository_name }}
TAGS: ${env.IMAGE_NAME}:latest, ${env.IMAGE_NAME}:${env.VERSION}

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v2
- name: Checkout ekgf/gloud-terraform
uses: actions/checkout@v4

- name: Build and push Docker images
uses: docker/build-push-action@v1.1.0
uses: docker/build-push-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
repository: ekgf/gcloud-terraform
#
# TODO: Get the version number from a file (for instance localbuild.sh) or "/VERSION"
#
tags: latest, 0.0.6
always_pull: true
tags: ${env.TAGS}
pull: true
4 changes: 2 additions & 2 deletions localbuild.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
_IMAGE_NAME="docker.io/ekgf/gcloud-terraform"
_IMAGE_NAME="ghcr.io/ekgf/gcloud-terraform"
_IMAGE_VERSION="latest"
_MANUALLY_INCREMENTED_IMAGE_VERSION="0.0.6"
_MANUALLY_INCREMENTED_IMAGE_VERSION="0.0.7"

cd "${SCRIPT_DIR}" || exit 1

Expand Down

0 comments on commit fe0ae2c

Please sign in to comment.