diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml deleted file mode 100644 index d657a63..0000000 --- a/.github/workflows/docker-image.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Docker Image CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..194bd06 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,18 @@ +name: publish +on: [push] +jobs: +publish-hello-docker-image: +runs-on: ubuntu-latest +steps: +- uses: actions/checkout@v2 +- name: Login to GitHub Container Registry +uses: docker/login-action@v1 +with: +registry: ghcr.io +username: ${{ github.actor }} +password: ${{ secrets.GITHUB_TOKEN }} +- name: Build the hello-docker Docker image +run: | + docker build . --tag ghcr.io/chezburg/free-games-claimer:latest + docker run ghcr.io/chezburg/free-games-claimer:latest + docker push ghcr.io/chezburg/free-games-claimer:latest