diff --git a/.circleci/config.yml b/.circleci/config.yml index 7e0655f2..e10ebccb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ workflows: branches: only: - master + - elastic jobs: build: @@ -30,13 +31,10 @@ jobs: name: Build docker image command: | docker build -t astroband/${CIRCLE_PROJECT_REPONAME}:latest -t astroband/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_BRANCH}-${CIRCLE_SHA1} . - docker build -t docker.pkg.github.com/astroband/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}:latest -t docker.pkg.github.com/astroband/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_SHA1} . # deploy the image - run: - name: Push image to DockerHub and Github packages + name: Push image to DockerHub command: | docker push astroband/${CIRCLE_PROJECT_REPONAME}:latest docker push astroband/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_BRANCH}-${CIRCLE_SHA1} - docker push docker.pkg.github.com/astroband/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}:latest - docker push docker.pkg.github.com/astroband/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_PROJECT_REPONAME}:${CIRCLE_SHA1} diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml new file mode 100644 index 00000000..48b2c4cf --- /dev/null +++ b/.github/workflows/package.yml @@ -0,0 +1,19 @@ +name: Build Github package +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - name: Login to docker + run: docker login docker.pkg.github.com --username ${{ github.actor }} --password ${{ github.token }} + - name: Build images + run: docker build -t docker.pkg.github.com/${{ github.repository }}/astrograph:${{ github:sha }} -t docker.pkg.github.com/${{ github.repository }}/astrograph:latest . + - name: Push images + run: | + docker push docker.pkg.github.com/${{ github.repository }}/astrograph:${{ github:sha }} + docker push docker.pkg.github.com/${{ github.repository }}/astrograph:latest