From 453938dcb3dd069c051c8298a7cf546194c9d2f9 Mon Sep 17 00:00:00 2001 From: neothor Date: Thu, 26 Dec 2019 05:04:48 +0700 Subject: [PATCH 1/3] Add docker build github workflow --- .github/workflows/dockerimage.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/dockerimage.yml diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml new file mode 100644 index 0000000..5f2966b --- /dev/null +++ b/.github/workflows/dockerimage.yml @@ -0,0 +1,14 @@ +name: Docker Image CI + +on: [push] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Build the Docker image + run: docker build . --file Dockerfile --tag neothor/steam-open-id:$(date +%s) From 488d1d6e1962bf186ce986e57b3f138f4bad2e41 Mon Sep 17 00:00:00 2001 From: Mark Ettema Date: Fri, 27 Dec 2019 00:43:50 +0700 Subject: [PATCH 2/3] Added docker push --- .github/workflows/dockerimage.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index 5f2966b..c2a361c 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -12,3 +12,11 @@ jobs: - uses: actions/checkout@v1 - name: Build the Docker image run: docker build . --file Dockerfile --tag neothor/steam-open-id:$(date +%s) + - name: Push the Docker image + uses: jerray/publish-docker-action@master + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: docker.pkg.github.com + repository: neothor/steam-open-id + auto_tag: true \ No newline at end of file From b40945ee1d7772ce33d1610414c29b8b6664dee0 Mon Sep 17 00:00:00 2001 From: Mark Ettema Date: Fri, 27 Dec 2019 01:02:57 +0700 Subject: [PATCH 3/3] Use docker hub actions --- .github/workflows/dockerimage.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dockerimage.yml b/.github/workflows/dockerimage.yml index c2a361c..909085f 100644 --- a/.github/workflows/dockerimage.yml +++ b/.github/workflows/dockerimage.yml @@ -10,13 +10,20 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Build the Docker image - run: docker build . --file Dockerfile --tag neothor/steam-open-id:$(date +%s) - - name: Push the Docker image - uses: jerray/publish-docker-action@master + + - name: Login to docker hub + if: success() + uses: actions-hub/docker/login@master + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build image + if: success() + run: docker build -t neothor/steam-open-id:${IMAGE_TAG} . + + - name: Push to docker registry + if: success() + uses: actions-hub/docker@master with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - registry: docker.pkg.github.com - repository: neothor/steam-open-id - auto_tag: true \ No newline at end of file + args: push neothor/steam-open-id:${IMAGE_TAG} \ No newline at end of file